From 94fc9ebcf0523a8e9e93da432132aa51d4b389f6 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Wed, 21 Jul 2010 12:48:51 +0000 Subject: [PATCH] Fixed issue 611 and old bug that caused bottom toolbar to not be updated when selecting another text element git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1640 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 9c4eddd7..388640a6 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -618,8 +618,8 @@ } // Update selectedElement if element is no longer part of the image. // This occurs for the text elements in Firefox - else if(elem && selectedElement && selectedElement.parentNode == null - || elem && elem.tagName == "path" && !multiselected) { + else if(elem && selectedElement && selectedElement.parentNode == null) { +// || elem && elem.tagName == "path" && !multiselected) { // This was added in r1430, but not sure why selectedElement = elem; } } @@ -1153,7 +1153,8 @@ // updates the toolbar (colors, opacity, etc) based on the selected element // This function also updates the opacity and id elements that are in the context panel var updateToolbar = function() { - if (selectedElement != null && $.inArray(selectedElement.tagName, ['image', 'text', 'foreignObject', 'g', 'a']) === -1) { + if (selectedElement != null && $.inArray(selectedElement.tagName, ['image', 'foreignObject', 'g', 'a']) === -1) { + // get opacity values var fillOpacity = parseFloat(selectedElement.getAttribute("fill-opacity")); if (isNaN(fillOpacity)) {