+ this.dom.children('.canvas-widgets').empty();
+ },
+ addToGutter: function(view) {
+ if(!this.gutterGroup) {
+ this.gutterGroup = this.canvas.gutter.createViewGroup({
+ offsetHint: function() {
+ return this.canvas.getElementOffset(this);
+ }.bind(this)
+ }, this);
+ }
+ this.gutterGroup.addView(view);
+ },
+ createContainer: function(nodes, params) {
+ var toret = container.create(nodes, params, this);
+ this.containers.push(toret);
+ return toret;
+ },
+ removeContainer: function(container) {
+ var idx;
+ if((idx = this.containers.indexOf(container)) !== -1) {
+ this.containers.splice(idx, 1);
+ }
+ },
+ createElement: function(wlxmlNode) {
+ var parent = this.wlxmlNode.parent() ? utils.getElementForNode(this.wlxmlNode.parent()) : null;
+ return this.canvas.createElement(wlxmlNode, this.elementsRegister, !parent) || parent.createElement(wlxmlNode);
+ },
+ addToContextMenu: function(actionFqName) {
+ this.contextMenuActions.push(this.canvas.createAction(actionFqName));