fix in documentCanvas module
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 6 Jun 2013 11:03:05 +0000 (13:03 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 6 Jun 2013 11:03:05 +0000 (13:03 +0200)
modules/documentCanvas/documentCanvas.js

index 7e7fdf0..93d1866 100644 (file)
@@ -92,7 +92,7 @@ return function(sandbox) {
                 anchor.before(newNode)\r
             else\r
                 anchor.after(newNode);\r
                 anchor.before(newNode)\r
             else\r
                 anchor.after(newNode);\r
-            mediator.nodeCreated(newNode);\r
+            this.selectNode(newNode);\r
             //isDirty = true;\r
             sandbox.publish('contentChanged');\r
         },\r
             //isDirty = true;\r
             sandbox.publish('contentChanged');\r
         },\r
@@ -115,7 +115,8 @@ return function(sandbox) {
                 $(node).replaceWith(newNode);\r
                 newNode.before(prefix);\r
                 newNode.after(suffix);\r
                 $(node).replaceWith(newNode);\r
                 newNode.before(prefix);\r
                 newNode.after(suffix);\r
-                mediator.nodeCreated(newNode);\r
+                \r
+                this.selectNode(newNode);\r
                 //isDirty = true;\r
                 sandbox.publish('contentChanged');\r
             }\r
                 //isDirty = true;\r
                 sandbox.publish('contentChanged');\r
             }\r
@@ -141,7 +142,8 @@ return function(sandbox) {
                 node.replaceWith(newNode);\r
                 newNode.before(prefixNode);\r
                 newNode.after(suffixNode);\r
                 node.replaceWith(newNode);\r
                 newNode.before(prefixNode);\r
                 newNode.after(suffixNode);\r
-                mediator.nodeCreated(newNode);\r
+                \r
+                this.selectNode(newNode);\r
                 //isDirty = true;\r
                 sandbox.publish('contentChanged');\r
             }\r
                 //isDirty = true;\r
                 sandbox.publish('contentChanged');\r
             }\r