Fix Issue 430: Update layers panel when opened SVG file does not have a viewBox attribute

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1247 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2010-01-20 15:24:50 +00:00
parent ddeace083c
commit 37b9a3b426
2 changed files with 26 additions and 34 deletions

View File

@@ -215,16 +215,11 @@ function svg_edit_setup() {
// called when any element has changed
var elementChanged = function(window,elems) {
for (var i = 0; i < elems.length; ++i) {
var elem = elems[i];
// if the element changed was the svg, then it could be a resolution change
if (elem && elem.tagName == "svg" && elem.getAttribute("viewBox")) {
// var vb = elem.getAttribute("viewBox").split(' ');
// changeResolution(parseInt(vb[2]),
// parseInt(vb[3]));
if (elem && elem.tagName == "svg") {
populateLayers();
}
// Update selectedElement if element is no longer part of the image.