@@ -88,7 +88,7 @@ define([
8888 svgCode = that . module . getConfiguration ( 'svgcode' ) ;
8989 }
9090
91- return new Promise ( ( resolve , reject ) => {
91+ return new Promise ( resolve => {
9292 if ( this . _configCheckBox ( 'editable' , 'isEditable' ) ) {
9393 if ( this . dom ) this . dom . remove ( ) ;
9494 this . svgCanvas = null ;
@@ -150,8 +150,8 @@ define([
150150
151151 update : {
152152 svgModifier : function ( data ) {
153- // Avoid potential problems when separete elements of this array share the same reference to an object
154153 this . queuedSvgModifier = data ;
154+ this . modifySvgFromArray ( this . queuedSvgModifier , true ) ;
155155 } ,
156156 svgInput : function ( svgCode ) {
157157 this . _renderSvg ( svgCode ) ;
@@ -305,7 +305,7 @@ define([
305305 var $svgEl ;
306306 var $svgcontent = this . $svgcontent ;
307307 $svgEl = $svgcontent . find ( selector ) ;
308- if ( $svgEl . length === 0 ) {
308+ if ( $svgEl . length === 0 && selector [ 0 ] !== '#' ) {
309309 $svgEl = $svgcontent . find ( '#' + selector ) ;
310310 }
311311
@@ -359,7 +359,7 @@ define([
359359 that . addAnimations ( $svgEl , obj . animation ) ;
360360 }
361361
362- // We don't set callback on secondary calls
362+ // We don't set callbacks on secondary calls
363363 if ( ! isPrimaryCall )
364364 return ;
365365
@@ -436,7 +436,7 @@ define([
436436 if ( ! obj [ eventName ] . selector ) {
437437 obj [ eventName ] . selector = obj . selector ;
438438 }
439- that . modifySvgFromArray ( obj [ eventName ] , true ) ;
439+ that . modifySvgFromArray ( obj [ eventName ] , false ) ;
440440 } ) ;
441441 } ) ( mouseEventNames [ j ] ) ;
442442 }
@@ -450,18 +450,6 @@ define([
450450 } ) . toArray ( ) . join ( ',' ) ;
451451 } ,
452452
453- _clearEventCallbacks : function ( svgModifier ) {
454- // This is a bit brutal, since we potentially clear callbacks that we did not set...
455- for ( var i = 0 ; i < svgModifier . length ; i ++ ) {
456- if ( svgModifier . selector ) {
457- for ( var j = 0 ; j < mouseEventNames . length ; j ++ ) {
458- $ ( svgModifier . selector ) . off ( mouseEventNames [ j ] + '.svgeditor.svgmodifier' ) ;
459- }
460- }
461- }
462- } ,
463-
464-
465453 getDom : function ( ) {
466454 return this . dom ;
467455 } ,
0 commit comments