diff --git a/editor/canvg/canvg.js b/editor/canvg/canvg.js index c67269ec..bc0d9e37 100644 --- a/editor/canvg/canvg.js +++ b/editor/canvg/canvg.js @@ -31,6 +31,8 @@ if(!Array.indexOf){ // opts: optional hash of options // ignoreMouse: true => ignore mouse events // ignoreAnimation: true => ignore animations + // renderCallback: function => will call the function after the first render is completed + // forceRedraw: function => will call the function on every frame, if it returns true, will redraw this.canvg = function (target, s, opts) { if (typeof target == 'string') { target = document.getElementById(target); @@ -69,6 +71,7 @@ if(!Array.indexOf){ svg.Definitions = {}; svg.Styles = {}; svg.Animations = []; + svg.Images = []; svg.ctx = ctx; svg.ViewPort = new (function () { this.viewPorts = []; @@ -86,6 +89,14 @@ if(!Array.indexOf){ }); } svg.init(); + + // images loaded + svg.ImagesLoaded = function() { + for (var i=0; i