fix for transparent color

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2225 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
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 -->
<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 -->
<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:
paintBox.fill.update(true);
paintBox.stroke.update(true);
//console.log(paintBox.fill);
$('#stroke_width').val(selectedElement.getAttribute("stroke-width") || 1);
$('#stroke_style').val(selectedElement.getAttribute("stroke-dasharray")||"none");
@ -1957,7 +1958,7 @@
var paint = null;
// Webkit-based browsers returned 'initial' here for no stroke
if (color === 'transparent' || color === 'initial') {
if (color === 'none' || color === 'transparent' || color === 'initial') {
color = 'none';
paint = new $.jGraduate.Paint();
}
@ -3373,7 +3374,6 @@
},
function(p) {
paint = new $.jGraduate.Paint(p);
paintBox[picker].setPaint(paint);
svgCanvas.setPaint(picker, paint);
@ -3472,7 +3472,7 @@
switch ( ptype ) {
case 'solidColor':
fillAttr = "#" + paint[ptype];
fillAttr = (paint[ptype] != 'none') ? "#" + paint[ptype] : paint[ptype];
break;
case 'linearGradient':
case 'radialGradient':