aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js44
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.html6
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js48
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.css22
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.html14
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js44
-rwxr-xr-xjs/components/layout/documents-tab.reel/documents-tab.html13
-rwxr-xr-xjs/components/layout/documents-tab.reel/documents-tab.js5
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html6
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.js39
-rwxr-xr-xjs/components/layout/tools-properties.reel/tools-properties.js42
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js6
-rwxr-xr-xjs/components/menu/menu.reel/menu.html20
-rwxr-xr-xjs/controllers/document-controller.js182
-rwxr-xr-xjs/controllers/elements/shapes-controller.js4
-rwxr-xr-xjs/controllers/selection-controller.js61
-rwxr-xr-xjs/controllers/styles-controller.js93
-rwxr-xr-xjs/controllers/undo-controller.js8
-rwxr-xr-xjs/document/models/text.js2
-rwxr-xr-xjs/mediators/element-mediator.js6
-rwxr-xr-xjs/ninja.reel/ninja.html80
-rwxr-xr-xjs/ninja.reel/ninja.js50
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js29
-rwxr-xr-xjs/panels/Panel.reel/Panel.js24
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html21
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js29
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js4
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js1
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js4
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js8
-rwxr-xr-xjs/panels/properties.reel/properties.js40
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js91
-rwxr-xr-xjs/stage/layout.js37
-rwxr-xr-xjs/stage/stage-deps.js40
-rwxr-xr-xjs/stage/stage.reel/stage.html18
-rwxr-xr-xjs/stage/stage.reel/stage.js37
-rwxr-xr-xjs/tools/PanTool.js1
37 files changed, 681 insertions, 498 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index 49dbe3cb..74e89ac1 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -9,13 +9,45 @@ var Montage = require("montage/core/core").Montage,
9 9
10exports.Breadcrumb = Montage.create(Component, { 10exports.Breadcrumb = Montage.create(Component, {
11 11
12 disabled: { 12 _currentDocument: {
13 enumerable: false,
14 value: null
15 },
16
17 currentDocument: {
18 enumerable: false,
19 get: function() {
20 return this._currentDocument;
21 },
22 set: function(value) {
23 if (value === this._currentDocument) {
24 return;
25 }
26
27 this._currentDocument = value;
28
29 if(!this._currentDocument) {
30 this.disabled = true;
31 }
32
33 this.disabled = this._currentDocument.currentView !== "design";
34
35 }
36 },
37
38
39 _disabled: {
13 value: true 40 value: true
14 }, 41 },
15 42
16 handleOpenDocument: { 43 disabled: {
17 value: function(){ 44 get: function() {
18 this.disabled = false; 45 return this._disabled;
46 },
47 set: function(value) {
48 if(value !== this._disabled) {
49 this._disabled = value;
50 }
19 } 51 }
20 }, 52 },
21 53
@@ -50,7 +82,6 @@ exports.Breadcrumb = Montage.create(Component, {
50 82
51 prepareForDraw: { 83 prepareForDraw: {
52 value: function() { 84 value: function() {
53 this.eventManager.addEventListener("openDocument", this, false);
54 this.eventManager.addEventListener("closeDocument", this, false); 85 this.eventManager.addEventListener("closeDocument", this, false);
55 this.breadcrumbBt.addEventListener("action", this, false); 86 this.breadcrumbBt.addEventListener("action", this, false);
56 } 87 }
@@ -65,7 +96,7 @@ exports.Breadcrumb = Montage.create(Component, {
65 96
66 parentNode = this.container; 97 parentNode = this.container;
67 98
68 while(parentNode !== this.application.ninja.currentDocument.model.documentRoot) { 99 while(parentNode !== this.currentDocument.model.documentRoot) {
69 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); 100 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
70 parentNode = parentNode.parentNode; 101 parentNode = parentNode.parentNode;
71 } 102 }
@@ -87,6 +118,7 @@ exports.Breadcrumb = Montage.create(Component, {
87 this.containerElements.pop(); 118 this.containerElements.pop();
88 } 119 }
89 120
121 // TODO: This is bound 2 ways, update the internal property
90 this.application.ninja.currentSelectedContainer = this.containerElements[i].node; 122 this.application.ninja.currentSelectedContainer = this.containerElements[i].node;
91 } 123 }
92 } 124 }
diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html
index 760186ba..a35b5590 100755
--- a/js/components/layout/document-bar.reel/document-bar.html
+++ b/js/components/layout/document-bar.reel/document-bar.html
@@ -37,11 +37,7 @@
37 "element": {"#": "disabledCondition"} 37 "element": {"#": "disabledCondition"}
38 }, 38 },
39 "bindings": { 39 "bindings": {
40 "condition": { 40 "condition": {"<-": "@owner.disabled"}
41 "boundObject": {"@": "owner"},
42 "boundObjectPropertyPath": "disabled",
43 "oneway": true
44 }
45 } 41 }
46 }, 42 },
47 43
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js
index 56b61f1d..6a7b0f3f 100755
--- a/js/components/layout/document-bar.reel/document-bar.js
+++ b/js/components/layout/document-bar.reel/document-bar.js
@@ -9,13 +9,32 @@ var Component = require("montage/ui/component").Component;
9 9
10exports.DocumentBar = Montage.create(Component, { 10exports.DocumentBar = Montage.create(Component, {
11 11
12 _currentDocument: {
13 enumerable: false,
14 value: null
15 },
16
17 currentDocument: {
18 enumerable: false,
19 get: function() {
20 return this._currentDocument;
21 },
22 set: function(value) {
23 if (value === this._currentDocument) {
24 return;
25 }
26
27 this._currentDocument = value;
28
29 this.disabled = !this._currentDocument;
30
31 }
32 },
33
12 designView: { value: null, enumerable: false}, 34 designView: { value: null, enumerable: false},
13 codeView: { value: null, enumerable: false}, 35 codeView: { value: null, enumerable: false},
14 zoomControl: { value: null, enumerable: false }, 36 zoomControl: { value: null, enumerable: false },
15 _type: { enumerable: false, value: null }, 37 _type: { enumerable: false, value: null },
16 disabled: { value: true },
17
18
19 38
20 type: { 39 type: {
21 enumerable: false, 40 enumerable: false,
@@ -86,7 +105,6 @@ exports.DocumentBar = Montage.create(Component, {
86 105
87 prepareForDraw: { 106 prepareForDraw: {
88 value: function() { 107 value: function() {
89 this.eventManager.addEventListener( "openDocument", this, false);
90 this.eventManager.addEventListener( "closeDocument", this, false);