aboutsummaryrefslogtreecommitdiff
path: root/js/document/models
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/models')
-rwxr-xr-xjs/document/models/base.js14
-rwxr-xr-xjs/document/models/html.js11
-rwxr-xr-xjs/document/models/text.js3
3 files changed, 22 insertions, 6 deletions
diff --git a/js/document/models/base.js b/js/document/models/base.js
index 6d9d2e89..76a5e62b 100755
--- a/js/document/models/base.js
+++ b/js/document/models/base.js
@@ -62,6 +62,20 @@ exports.BaseDocumentModel = Montage.create(Component, {
62 }, 62 },
63 //////////////////////////////////////////////////////////////////// 63 ////////////////////////////////////////////////////////////////////
64 // 64 //
65 _selection: {
66 value: []
67 },
68
69 selection: {
70 get: function() {
71 return this._selection;
72 },
73 set: function(value) {
74 this._selection = value;
75 }
76 },
77 ////////////////////////////////////////////////////////////////////
78 //
65 fileTemplate: { 79 fileTemplate: {
66 value: null 80 value: null
67 }, 81 },
diff --git a/js/document/models/html.js b/js/document/models/html.js
index fd42d4de..9aa0d27e 100755
--- a/js/document/models/html.js
+++ b/js/document/models/html.js
@@ -18,9 +18,12 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
18 value: false 18 value: false
19 }, 19 },
20 //////////////////////////////////////////////////////////////////// 20 ////////////////////////////////////////////////////////////////////
21 // 21 //Called by the document immidiately after the model is created
22 selection: { 22 init: {
23 value: [] 23 value:function() {
24 //Creating instance of the webGL helper for this model
25 this.webGlHelper = webGlDocumentHelper.create();
26 }
24 }, 27 },
25 //////////////////////////////////////////////////////////////////// 28 ////////////////////////////////////////////////////////////////////
26 // 29 //
@@ -57,7 +60,7 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
57 //////////////////////////////////////////////////////////////////// 60 ////////////////////////////////////////////////////////////////////
58 // 61 //
59 webGlHelper: { 62 webGlHelper: {
60 value: webGlDocumentHelper 63 value: null
61 }, 64 },
62 //////////////////////////////////////////////////////////////////// 65 ////////////////////////////////////////////////////////////////////
63 // 66 //
diff --git a/js/document/models/text.js b/js/document/models/text.js
index d1252b7d..6cb61d48 100755
--- a/js/document/models/text.js
+++ b/js/document/models/text.js
@@ -22,7 +22,7 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, {
22 save: { 22 save: {
23 enumerable: false, 23 enumerable: false,
24 value: function (callback) { 24 value: function (callback) {
25 this.application.ninja.documentController.activeDocument.model.views.code.editor.save();//save to textarea 25 this.application.ninja.currentDocument.model.views.code.editor.save();//save to textarea
26 26
27 var self = this; 27 var self = this;
28 28
@@ -60,7 +60,6 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, {
60 } 60 }
61 // 61 //
62 this.parentContainer.removeChild(this.views.code.textViewContainer); 62 this.parentContainer.removeChild(this.views.code.textViewContainer);
63 this.application.ninja.stage.showCodeViewBar(false);
64 this.application.ninja.stage.restoreAllPanels(); 63 this.application.ninja.stage.restoreAllPanels();
65 this.views.code = null; 64 this.views.code = null;
66 65