Fixed remaining bug for 164 and additional bug that selects correct paint tab on change to gradient

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@561 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-09-04 14:52:21 +00:00
parent 4ec916cf9b
commit 5df494c2b6
2 changed files with 2 additions and 4 deletions

View File

@ -389,7 +389,7 @@ jQuery.fn.jGraduate =
var startx = -1, starty = -1; var startx = -1, starty = -1;
// for whatever reason, Opera does not allow $('image.stop') here, // for whatever reason, Opera does not allow $('image.stop') here,
// and Firefox 1.5 does not allow $('.stop') // and Firefox 1.5 does not allow $('.stop')
$('.stop, #gradPicker_jgraduate_svg image').mousedown(function(evt) { $('.stop, #color_picker_jGraduate_GradContainer image').mousedown(function(evt) {
draggingStop = this; draggingStop = this;
startx = evt.clientX; startx = evt.clientX;
starty = evt.clientY; starty = evt.clientY;

View File

@ -743,11 +743,9 @@ function svg_edit_setup() {
var colorPicker = function(elem) { var colorPicker = function(elem) {
var picker = elem.attr('id') == 'stroke_color' ? 'stroke' : 'fill'; var picker = elem.attr('id') == 'stroke_color' ? 'stroke' : 'fill';
var opacity = (picker == 'stroke' ? $('#stroke_opacity') : $('#fill_opacity')); var opacity = (picker == 'stroke' ? $('#stroke_opacity') : $('#fill_opacity'));
var paint = (picker == 'stroke' ? strokePaint : fillPaint); var paint = (picker == 'stroke' ? strokePaint : fillPaint);
var title = (picker == 'stroke' ? 'Pick a Stroke Paint and Opacity' : 'Pick a Fill Paint and Opacity'); var title = (picker == 'stroke' ? 'Pick a Stroke Paint and Opacity' : 'Pick a Fill Paint and Opacity');
var was_none = false; var was_none = false;
if (paint.type == "none") { if (paint.type == "none") {
// if it was none, then set to solid white // if it was none, then set to solid white
paint = new $.jGraduate.Paint({solidColor: 'ffffff'}); paint = new $.jGraduate.Paint({solidColor: 'ffffff'});
@ -784,7 +782,7 @@ function svg_edit_setup() {
else { else {
svgCanvas.setFillPaint(paint, true); svgCanvas.setFillPaint(paint, true);
} }
updateToolbar();
$('#color_picker').hide(); $('#color_picker').hide();
}, },
function(p) { function(p) {