+ defaultDisplayStyle: 'block',
+ init: function() {},
+ addWidget: function(widget) {
+ this.dom.children('.canvas-widgets').append(widget.DOM ? widget.DOM : widget);
+ },
+ clearWidgets: function() {
+ 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);
+ },
+ handle: function(event) {
+ var method = 'on' + event.type[0].toUpperCase() + event.type.substr(1);
+ if(this[method]) {
+ this[method](event);
+ }