diff options
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-x | js/document/views/design.js | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index b3887fdf..427ef706 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -67,8 +67,44 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
67 | propertiesPanel: { | 67 | propertiesPanel: { |
68 | value: null | 68 | value: null |
69 | }, | 69 | }, |
70 | |||
70 | //////////////////////////////////////////////////////////////////// | 71 | //////////////////////////////////////////////////////////////////// |
71 | // | 72 | // |
73 | _liveNodeList: { | ||
74 | value: null | ||
75 | }, | ||
76 | |||
77 | getLiveNodeList: { | ||
78 | value: function(useFilter) { | ||
79 | if(useFilter) { | ||
80 | var filteredNodes = [], | ||
81 | childNodes = Array.prototype.slice.call(this._liveNodeList, 0); | ||
82 | |||
83 | childNodes.forEach(function(item) { | ||
84 | if( (item.nodeType === 1) && (item.nodeName !== "STYLE") && (item.nodeName !== "SCRIPT")) { | ||
85 | filteredNodes.push(item); | ||
86 | } | ||
87 | }); | ||
88 | return filteredNodes; | ||
89 | } else { | ||
90 | return this._liveNodeList; | ||
91 | } | ||
92 | } | ||
93 | }, | ||
94 | //////////////////////////////////////////////////////////////////// | ||
95 | // | ||
96 | |||
97 | initialPaddingLeft: { | ||
98 | value: 0 | ||
99 | }, | ||
100 | |||
101 | initialPaddingTop: { | ||
102 | value: 0 | ||
103 | }, | ||
104 | //////////////////////////////////////////////////////////////////// | ||
105 | // | ||
106 | |||
107 | // | ||
72 | initialize: { | 108 | initialize: { |
73 | value: function (parent) { | 109 | value: function (parent) { |
74 | //Creating iFrame for view | 110 | //Creating iFrame for view |
@@ -190,8 +226,10 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
190 | //Calling standard method to finish opening document | 226 | //Calling standard method to finish opening document |
191 | this.bodyContentLoaded(null); | 227 | this.bodyContentLoaded(null); |
192 | //TODO: Move this to be set via the controller | 228 | //TODO: Move this to be set via the controller |
193 | this.application.ninja.stage.documentOffsetLeft = parseInt((this.document.body.scrollWidth - this._template.size.width)/2); | 229 | // this.application.ninja.stage.documentOffsetLeft = parseInt((this.document.body.scrollWidth - this._template.size.width)/2); |
194 | this.application.ninja.stage.documentOffsetTop = parseInt((this.document.body.scrollHeight - this._template.size.height)/2); | 230 | // this.application.ninja.stage.documentOffsetTop = parseInt((this.document.body.scrollHeight - this._template.size.height)/2); |
231 | // this.initialPaddingLeft = parseInt((this.document.body.scrollWidth - this._template.size.width)/2); | ||
232 | // this.initialPaddingTop = parseInt((this.document.body.scrollHeight - this._template.size.height)/2); | ||
195 | } | 233 | } |
196 | }, | 234 | }, |
197 | //////////////////////////////////////////////////////////////////// | 235 | //////////////////////////////////////////////////////////////////// |