diff --git a/editor/svg-editor.css b/editor/svg-editor.css index 2e158dae..3afee9fb 100644 --- a/editor/svg-editor.css +++ b/editor/svg-editor.css @@ -398,6 +398,7 @@ opacity: 1; pointer-events: stroke; vector-effect: non-scaling-stroke; + filter: none; } #workarea.wireframe #svgcontent text { diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 364f1e0c..a0075d9c 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -1298,13 +1298,13 @@ svgCanvas.setOpacity(val/100); } - var changeBlur = function(ctl, val) { + var changeBlur = function(ctl, val, noUndo) { if(val == null) val = ctl.value; $('#blur').val(val); if(!ctl || !ctl.handle) { $('#blur_slider').slider('option', 'value', val); } - svgCanvas.setBlur(val); + svgCanvas.setBlur(val, noUndo); } var operaRepaint = function() { @@ -1690,12 +1690,13 @@ $("#blur_slider").slider({ max: 10, step: .1, - stop: function() { + stop: function(evt, ui) { + changeBlur(ui); $('#blur_dropdown li').show(); $(window).mouseup(); }, slide: function(evt, ui){ - changeBlur(ui); + changeBlur(ui, null, true); } }); diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index c698dd62..628ca335 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -7100,7 +7100,7 @@ function BatchCommand(text) { return val; } - this.setBlur = function(val) { + this.setBlur = function(val, noUndo) { // Looks for associated blur, creates one if not found var elem_id = selectedElements[0].id; var filter = getElem(elem_id + '_blur'); @@ -7112,7 +7112,12 @@ function BatchCommand(text) { if(val === 0) { $(filter).remove(); } else { - filter.firstChild.setAttribute('stdDeviation', val); + var elem = filter.firstChild; + if(noUndo) { + this.changeSelectedAttributeNoUndo('stdDeviation', val, [elem]); + } else { + this.changeSelectedAttribute('stdDeviation', val, [elem]); + } } } else { // Not found, so create