fix for transparent color

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2225 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Mark MacKay
2012-12-05 00:06:48 +00:00
parent fb7e0d6682
commit bea865ae4f
3 changed files with 2095 additions and 4 deletions

2091
editor/jgraduate/jpicker.js Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,7 @@
<!-- always minified scripts --> <!-- always minified scripts -->
<script type="text/javascript" src="jquery-ui/jquery-ui-1.8.17.custom.min.js"></script> <script type="text/javascript" src="jquery-ui/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="jgraduate/jpicker.min.js"></script> <script type="text/javascript" src="jgraduate/jpicker.js"></script>
<!-- feeds --> <!-- feeds -->
<link rel="alternate" type="application/atom+xml" title="SVG-edit General Discussion" href="http://groups.google.com/group/svg-edit/feed/atom_v1_0_msgs.xml" /> <link rel="alternate" type="application/atom+xml" title="SVG-edit General Discussion" href="http://groups.google.com/group/svg-edit/feed/atom_v1_0_msgs.xml" />

View File

@@ -1425,6 +1425,7 @@
default: default:
paintBox.fill.update(true); paintBox.fill.update(true);
paintBox.stroke.update(true); paintBox.stroke.update(true);
//console.log(paintBox.fill);
$('#stroke_width').val(selectedElement.getAttribute("stroke-width") || 1); $('#stroke_width').val(selectedElement.getAttribute("stroke-width") || 1);
$('#stroke_style').val(selectedElement.getAttribute("stroke-dasharray")||"none"); $('#stroke_style').val(selectedElement.getAttribute("stroke-dasharray")||"none");
@@ -1957,7 +1958,7 @@
var paint = null; var paint = null;
// Webkit-based browsers returned 'initial' here for no stroke // Webkit-based browsers returned 'initial' here for no stroke
if (color === 'transparent' || color === 'initial') { if (color === 'none' || color === 'transparent' || color === 'initial') {
color = 'none'; color = 'none';
paint = new $.jGraduate.Paint(); paint = new $.jGraduate.Paint();
} }
@@ -3373,7 +3374,6 @@
}, },
function(p) { function(p) {
paint = new $.jGraduate.Paint(p); paint = new $.jGraduate.Paint(p);
paintBox[picker].setPaint(paint); paintBox[picker].setPaint(paint);
svgCanvas.setPaint(picker, paint); svgCanvas.setPaint(picker, paint);
@@ -3472,7 +3472,7 @@
switch ( ptype ) { switch ( ptype ) {
case 'solidColor': case 'solidColor':
fillAttr = "#" + paint[ptype]; fillAttr = (paint[ptype] != 'none') ? "#" + paint[ptype] : paint[ptype];
break; break;
case 'linearGradient': case 'linearGradient':
case 'radialGradient': case 'radialGradient':