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
master
Alexis Deveria 2010-07-21 12:48:51 +00:00
parent f7d57e54c7
commit 94fc9ebcf0
1 changed files with 4 additions and 3 deletions

View File

@ -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)) {