From 357a28ec680c34b4e49a1146f4b5639120f98833 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Wed, 27 Oct 2010 18:58:34 +0000 Subject: [PATCH] Made root SVG width/height be set to base unit on serialization, fixed minor path drawing bug, fixed Issue 579: Text disappear when low blur is set git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1827 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 528d5007..a6fdc461 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -9907,8 +9907,14 @@ this.getBlur = function(elem) { changeSelectedAttributeNoUndo("filter", ""); filterHidden = true; } else { + var elem = selectedElements[0]; if(filterHidden) { - changeSelectedAttributeNoUndo("filter", 'url(#' + selectedElements[0].id + '_blur)'); + changeSelectedAttributeNoUndo("filter", 'url(#' + elem.id + '_blur)'); + } + if(isWebkit) { + console.log('e', elem); + elem.removeAttribute('filter'); + elem.setAttribute('filter', 'url(#' + elem.id + '_blur)'); } changeSelectedAttributeNoUndo("stdDeviation", val, [filter.firstChild]); canvas.setBlurOffsets(filter, val); @@ -9940,10 +9946,13 @@ this.getBlur = function(elem) { height: '200%', }, 100); } else { - filter.removeAttribute('x'); - filter.removeAttribute('y'); - filter.removeAttribute('width'); - filter.removeAttribute('height'); + // Removing these attributes hides text in Chrome (see Issue 579) + if(!isWebkit) { + filter.removeAttribute('x'); + filter.removeAttribute('y'); + filter.removeAttribute('width'); + filter.removeAttribute('height'); + } } }