3 'modules/documentCanvas/canvas/utils',
4 ], function($, utils) {
8 var Listener = function(canvas) {
12 $.extend(Listener.prototype, {
13 listenTo: function(wlxmlDocument) {
14 if(wlxmlDocument === this.wlxmlDocument) {
18 wlxmlDocument.on('change', function(event) {
19 var handler = handlers[event.type];
21 handler.bind(this)(event);
28 nodeAttrChange: function(event) {
29 if(event.meta.attr === 'class') {
30 var canvasNode = utils.findCanvasElement(event.meta.node);
31 canvasNode.setWlxmlClass(event.meta.newVal);
37 create: function(canvas) {
38 return new Listener(canvas);