diff options
-rw-r--r-- | js/controllers/objects-controller.js | 10 | ||||
-rwxr-xr-x | js/document/document-html.js | 3 | ||||
-rwxr-xr-x | js/document/models/base.js | 13 | ||||
-rwxr-xr-x | js/document/models/html.js | 3 | ||||
-rwxr-xr-x | js/document/views/design.js | 6 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 3 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 8 | ||||
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.html | 6 |
8 files changed, 42 insertions, 10 deletions
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js index 2ce10e82..fd9b12f4 100644 --- a/js/controllers/objects-controller.js +++ b/js/controllers/objects-controller.js | |||
@@ -45,11 +45,11 @@ var objectsController = exports.ObjectsController = Montage.create(Component, { | |||
45 | this._isBoundToModelObjects = true; | 45 | this._isBoundToModelObjects = true; |
46 | } | 46 | } |
47 | 47 | ||
48 | Object.defineBinding(this, 'objects', { | 48 | // Object.defineBinding(this, 'objects', { |
49 | boundObject: this.currentDocument.model, | 49 | // boundObject: this.currentDocument.model, |
50 | boundObjectPropertyPath: 'objects', | 50 | // boundObjectPropertyPath: 'mObjects', |
51 | oneway: false | 51 | // oneway: false |
52 | }); | 52 | // }); |
53 | } | 53 | } |
54 | }, | 54 | }, |
55 | 55 | ||
diff --git a/js/document/document-html.js b/js/document/document-html.js index 04565753..8b82c40f 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -106,7 +106,8 @@ exports.HtmlDocument = Montage.create(Component, { | |||
106 | } | 106 | } |
107 | }, | 107 | }, |
108 | handleViewReady: { | 108 | handleViewReady: { |
109 | value: function() { | 109 | value: function(mObjects) { |
110 | this.model.mObjects = mObjects; | ||
110 | //Making callback after view is loaded | 111 | //Making callback after view is loaded |
111 | this.loaded.callback.call(this.loaded.context, this); | 112 | this.loaded.callback.call(this.loaded.context, this); |
112 | } | 113 | } |
diff --git a/js/document/models/base.js b/js/document/models/base.js index 5fa06259..9c26bd2a 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -91,6 +91,19 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
91 | libs: { | 91 | libs: { |
92 | value: null | 92 | value: null |
93 | }, | 93 | }, |
94 | |||
95 | _mObjects: { | ||
96 | value: [] | ||
97 | }, | ||
98 | |||
99 | mObjects: { | ||
100 | get: function() { | ||
101 | return this._mObjects; | ||
102 | }, | ||
103 | set: function(value) { | ||
104 | this._mObjects = value; | ||
105 | } | ||
106 | }, | ||
94 | //////////////////////////////////////////////////////////////////// | 107 | //////////////////////////////////////////////////////////////////// |
95 | // | 108 | // |
96 | switchViewTo: { | 109 | switchViewTo: { |
diff --git a/js/document/models/html.js b/js/document/models/html.js index 7064c6e3..f65cd8c3 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js | |||
@@ -73,9 +73,10 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | |||
73 | // | 73 | // |
74 | webGlHelper: { | 74 | webGlHelper: { |
75 | value: null | 75 | value: null |
76 | }, | 76 | } |
77 | //////////////////////////////////////////////////////////////////// | 77 | //////////////////////////////////////////////////////////////////// |
78 | //////////////////////////////////////////////////////////////////// | 78 | //////////////////////////////////////////////////////////////////// |
79 | |||
79 | }); | 80 | }); |
80 | //////////////////////////////////////////////////////////////////////// | 81 | //////////////////////////////////////////////////////////////////////// |
81 | //////////////////////////////////////////////////////////////////////// \ No newline at end of file | 82 | //////////////////////////////////////////////////////////////////////// \ No newline at end of file |
diff --git a/js/document/views/design.js b/js/document/views/design.js index dad6de8b..4484167a 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -450,15 +450,17 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
450 | template.initWithDocument(this.iframe.contentWindow.document); | 450 | template.initWithDocument(this.iframe.contentWindow.document); |
451 | template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){ | 451 | template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){ |
452 | //TODO: Verify this is properly done, seems like a hack | 452 | //TODO: Verify this is properly done, seems like a hack |
453 | |||
454 | var objArray = []; | ||
453 | for (var c in template._deserializer._objects) { | 455 | for (var c in template._deserializer._objects) { |
454 | //Forcing draw on components | 456 | //Forcing draw on components |
455 | template._deserializer._objects[c].needsDraw = true; | 457 | template._deserializer._objects[c].needsDraw = true; |
456 | //this.model.objects = template.deserializer.getObjectsFromLastDeserialization(); | 458 | objArray.push(template._deserializer._objects[c]); |
457 | } | 459 | } |
458 | 460 | ||
459 | // Now call the view callback | 461 | // Now call the view callback |
460 | if(self._viewCallback) { | 462 | if(self._viewCallback) { |
461 | self._viewCallback.viewCallback.call(self._viewCallback.context); | 463 | self._viewCallback.viewCallback.call(self._viewCallback.context, objArray); |
462 | } | 464 | } |
463 | 465 | ||
464 | }); | 466 | }); |
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 221e492c..11f7c53e 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -363,7 +363,8 @@ | |||
363 | "objectsController" : { | 363 | "objectsController" : { |
364 | "prototype": "js/controllers/objects-controller", | 364 | "prototype": "js/controllers/objects-controller", |
365 | "bindings": { | 365 | "bindings": { |
366 | "currentDocument": {"<-": "@owner.currentDocument"} | 366 | "currentDocument": {"<-": "@documentList.selectedObjects.0"}, |
367 | "objects": {"<-": "@documentList.selectedObjects.0.model.mObjects"} | ||
367 | } | 368 | } |
368 | }, | 369 | }, |
369 | 370 | ||
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 5f753bd3..fe20447a 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -23,6 +23,9 @@ exports.Ninja = Montage.create(Component, { | |||
23 | value: null | 23 | value: null |
24 | }, | 24 | }, |
25 | 25 | ||
26 | appData: { | ||
27 | value: AppData | ||
28 | }, | ||
26 | 29 | ||
27 | documentList: { | 30 | documentList: { |
28 | value: null | 31 | value: null |
@@ -57,9 +60,14 @@ exports.Ninja = Montage.create(Component, { | |||
57 | } | 60 | } |
58 | }, | 61 | }, |
59 | 62 | ||
63 | _isResizing: { | ||
64 | value: null | ||
65 | }, | ||
66 | |||
60 | _resizedHeight : { | 67 | _resizedHeight : { |
61 | value: 0 | 68 | value: 0 |
62 | }, | 69 | }, |
70 | |||
63 | _height: { | 71 | _height: { |
64 | value: null | 72 | value: null |
65 | }, | 73 | }, |
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html index 7d7444c5..9842a1d1 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html | |||
@@ -88,6 +88,9 @@ | |||
88 | "prototype": "js/panels/Panel.reel", | 88 | "prototype": "js/panels/Panel.reel", |
89 | "properties": { | 89 | "properties": { |
90 | "element": {"#": "panel_7"} | 90 | "element": {"#": "panel_7"} |
91 | }, | ||
92 | "bindings": { | ||
93 | "currentDocument": {"<-": "@owner.currentDocument"} | ||
91 | } | 94 | } |
92 | }, | 95 | }, |
93 | 96 | ||
@@ -95,6 +98,9 @@ | |||
95 | "prototype": "js/panels/Panel.reel", | 98 | "prototype": "js/panels/Panel.reel", |
96 | "properties": { | 99 | "properties": { |
97 | "element": {"#": "panel_8"} | 100 | "element": {"#": "panel_8"} |
101 | }, | ||
102 | "bindings": { | ||
103 | "currentDocument": {"<-": "@owner.currentDocument"} | ||
98 | } | 104 | } |
99 | }, | 105 | }, |
100 | 106 | ||