view.insertNewNode(null, null);\r
}\r
});\r
- \r
- \r
- var observer = new MutationObserver(function(mutations) {\r
- mutations.forEach(function(mutation) {\r
- _.each(mutation.addedNodes, function(node) {\r
- node = $(node);\r
- node.parent().find('[wlxml-tag]').each(function() {\r
- var tag = $(this);\r
- if(!tag.attr('id'))\r
- tag.attr('id', 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0,v=c=='x'?r:r&0x3|0x8;return v.toString(16);}));\r
- });\r
- });\r
- }); \r
- });\r
- var config = { attributes: true, childList: true, characterData: true, subtree: true };\r
- observer.observe(this.node.find('#rng-module-documentCanvas-contentWrapper')[0], config);\r
- \r
this.gridToggled = false;\r
},\r
_createNode: function(wlxmlTag, wlxmlClass) {\r
toret.attr('wlxml-tag', wlxmlTag);\r
if(wlxmlClass)\r
toret.attr('wlxml-class', wlxmlClass);\r
+ toret.attr('id', 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0,v=c=='x'?r:r&0x3|0x8;return v.toString(16);}));\r
return toret;\r
},\r
insertNewNode: function(wlxmlTag, wlxmlClass) {\r