X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/e7eff731af23b9501d3180cee9f4037cc93a5922..b2ed6c0477904d9bcbf8494043f231a5197f6b78:/modules/documentCanvas/canvas/documentElement.js?ds=sidebyside diff --git a/modules/documentCanvas/canvas/documentElement.js b/modules/documentCanvas/canvas/documentElement.js index d58d8c1..4a236df 100644 --- a/modules/documentCanvas/canvas/documentElement.js +++ b/modules/documentCanvas/canvas/documentElement.js @@ -2,8 +2,10 @@ define([ 'libs/jquery-1.9.1.min', 'libs/underscore-min', 'modules/documentCanvas/classAttributes', -'modules/documentCanvas/canvas/utils' -], function($, _, classAttributes, utils) { +'modules/documentCanvas/canvas/utils', +'modules/documentCanvas/canvas/widgets', +'modules/documentCanvas/canvas/wlxmlManagers' +], function($, _, classAttributes, utils, widgets, wlxmlManagers) { 'use strict'; @@ -44,6 +46,9 @@ $.extend(DocumentElement.prototype, { _setupDOMHandler: function(htmlElement) { this.$element = $(htmlElement); }, + bound: function() { + return this.canvas !== undefined; + }, dom: function() { return this.$element; }, @@ -75,11 +80,6 @@ $.extend(DocumentElement.prototype, { return wrapper; }, - detach: function() { - this.dom().detach(); - this.canvas = null; - }, - markAsCurrent: function() { this.canvas.markAsCurrent(this); }, @@ -112,42 +112,31 @@ var DocumentNodeElement = function(htmlElement, canvas) { DocumentElement.call(this, htmlElement, canvas); }; -var getDisplayStyle = function(tag, klass) { - if(tag === 'metadata') - return 'none'; - if(tag === 'span') - return 'inline'; - return 'block'; -} - $.extend(DocumentNodeElement, { - createDOM: function(params) { - var dom = $('