Fix: adding/clearing node widgets corrupted widgets on all children nodes
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 14 Aug 2013 12:09:06 +0000 (14:09 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 14 Aug 2013 12:09:06 +0000 (14:09 +0200)
modules/documentCanvas/canvas/wlxmlManagers.js

index 0aa9575..e70cfd2 100644 (file)
@@ -11,11 +11,11 @@ var DocumentElementWrapper = function(documentElement) {
     this.documentElement = documentElement;
 
     this.addWidget = function(widget) {
     this.documentElement = documentElement;
 
     this.addWidget = function(widget) {
-        documentElement.dom().find('.canvas-widgets').append(widget);
+        documentElement.dom().children('.canvas-widgets').append(widget);
     };
 
     this.clearWidgets = function() {
     };
 
     this.clearWidgets = function() {
-        documentElement.dom().find('.canvas-widgets').empty();
+        documentElement.dom().children('.canvas-widgets').empty();
     }
 
     this.setDisplayStyle = function(displayStyle) {
     }
 
     this.setDisplayStyle = function(displayStyle) {