From b4840e8f7fb1d55fff4d66931df5cd94edbcde33 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Tue, 2 Feb 2010 20:45:16 +0000 Subject: [PATCH] Fixed issue 456 by adding a svgCanvas.ready() function git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1328 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.js | 2 ++ editor/svgcanvas.js | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 9184bea0..93e03131 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -2780,6 +2780,8 @@ function svg_edit_setup() { } }); } + + svgCanvas.runCallback(); } }); }()); diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 78203562..924e43db 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -7327,6 +7327,16 @@ function BatchCommand(text) { } this.clear(); + + this.ready = function(cb) { + this.callback = cb; + } + + this.runCallback = function() { + if(this.callback) { + this.callback(); + } + } function getElem(id) { if(svgroot.querySelector) {