Fix a Firefox bug, and make randomizeIDs() work with the new API (no global svgCanvas object).

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1457 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jacques Distler 2010-03-12 09:41:50 +00:00
parent 85a7f57e78
commit b3e6b1a538
1 changed files with 5 additions and 1 deletions

View File

@ -79,7 +79,7 @@
if(storage) { if(storage) {
if(store) storage.setItem(key, val); if(store) storage.setItem(key, val);
else return storage.getItem(key).value; else if (storage.getItem(key)) return storage.getItem(key).value;
} else if(window.widget) { } else if(window.widget) {
if(store) widget.setPreferenceForKey(val, key); if(store) widget.setPreferenceForKey(val, key);
else return widget.preferenceForKey(key); else return widget.preferenceForKey(key);
@ -126,6 +126,10 @@
} }
} }
Editor.randomizeIds = function() {
svgCanvas.randomizeIds(arguments)
}
Editor.init = function() { Editor.init = function() {
Editor.canvas = svgCanvas = new $.SvgCanvas(document.getElementById("svgcanvas"), curConfig); Editor.canvas = svgCanvas = new $.SvgCanvas(document.getElementById("svgcanvas"), curConfig);