aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js2
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html3
-rwxr-xr-xjs/panels/Splitter.js7
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js6
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js17
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js10
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js4
-rw-r--r--js/panels/css-panel/styles-view-delegate.js2
-rwxr-xr-xjs/panels/properties.reel/properties.js48
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js4
-rwxr-xr-xjs/panels/properties.reel/sections/position-size.reel/position-size.js8
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js2
12 files changed, 58 insertions, 55 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
index 4c0a3611..b4a803b2 100755
--- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
+++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
@@ -87,7 +87,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre
87 87
88 populateStyleSheetList: { 88 populateStyleSheetList: {
89 value: function() { 89 value: function() {
90 this.sections.sheets.doc = this.application.ninja.currentDocument._document; 90 this.sections.sheets.doc = this.application.ninja.currentDocument.model.views.design.document;
91 var styleTagCount = 0, 91 var styleTagCount = 0,
92 sect = this.sections.sheets, 92 sect = this.sections.sheets,
93 sheetsArray = nj.toArray(sect.doc.styleSheets), 93 sheetsArray = nj.toArray(sect.doc.styleSheets),
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html
index 1de88de3..1c144bf4 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.html
+++ b/js/panels/PanelContainer.reel/PanelContainer.html
@@ -54,11 +54,12 @@
54 "element": {"#": "panel_5"} 54 "element": {"#": "panel_5"}
55 } 55 }
56 }, 56 },
57
57 "panel_6": { 58 "panel_6": {
58 "module": "js/panels/Panel.reel", 59 "module": "js/panels/Panel.reel",
59 "name": "Panel", 60 "name": "Panel",
60 "properties": { 61 "properties": {
61 "element": {"#": "panel_6"} 62 "element": {"#": "panel_6"}
62 } 63 }
63 }, 64 },
64 65
diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js
index 0640abb2..f0fb1a45 100755
--- a/js/panels/Splitter.js
+++ b/js/panels/Splitter.js
@@ -111,8 +111,9 @@ exports.Splitter = Montage.create(Component, {
111 } else { 111 } else {
112 this.panel.removeEventListener("webkitTransitionEnd", this, false); 112 this.panel.removeEventListener("webkitTransitionEnd", this, false);
113 } 113 }
114 114 if(this.application.ninja.currentDocument && this.application.ninja.currentDocument.currentView === "design"){
115 this.application.ninja.stage.resizeCanvases = true; 115 this.application.ninja.stage.resizeCanvases = true;
116 }
116 } 117 }
117 }, 118 },
118 119
@@ -149,6 +150,7 @@ exports.Splitter = Montage.create(Component, {
149 this.panel.addEventListener("webkitTransitionEnd", this, false); 150 this.panel.addEventListener("webkitTransitionEnd", this, false);
150 } 151 }
151 this._collapsed = true; 152 this._collapsed = true;
153 this.disabled = true;
152 this.needsDraw = true; 154 this.needsDraw = true;
153 } 155 }
154 } 156 }
@@ -169,6 +171,7 @@ exports.Splitter = Montage.create(Component, {
169 } else { 171 } else {
170 this.panel.addEventListener("webkitTransitionEnd", this, false); 172 this.panel.addEventListener("webkitTransitionEnd", this, false);
171 } 173 }
174 this.disabled = false;
172 this.needsDraw = true; 175 this.needsDraw = true;
173 } 176 }
174 } 177 }
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 6358a0e0..e8619d02 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -498,11 +498,7 @@ var Layer = exports.Layer = Montage.create(Component, {
498 498
499 triggerOutgoingBinding : { 499 triggerOutgoingBinding : {
500 value: function() { 500 value: function() {
501 if (this.layerData.triggerBinding === true) { 501 this.layerData.triggerBinding = !this.layerData.triggerBinding;
502 this.layerData.triggerBinding = false;
503 } else {
504 this.layerData.triggerBinding = true;
505 }
506 } 502 }
507 }, 503 },
508 /* END: Models */ 504 /* END: Models */
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index c382c9a7..c55e5a24 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -437,6 +437,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
437 returnObj.layerData.isVisible = true; 437 returnObj.layerData.isVisible = true;
438 returnObj.layerData.docUUID = this.application.ninja.currentDocument._uuid; 438 returnObj.layerData.docUUID = this.application.ninja.currentDocument._uuid;
439 returnObj.layerData.isTrackAnimated = false; 439 returnObj.layerData.isTrackAnimated = false;
440 returnObj.layerData.triggerBinding = false;
440 returnObj.parentElementUUID = null; 441 returnObj.parentElementUUID = null;
441 returnObj.parentElement = null; 442 returnObj.parentElement = null;
442 443
@@ -595,13 +596,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
595 596
596 // That's all we need to do for a brand new file. 597 // That's all we need to do for a brand new file.
597 // But what if we're opening an existing document? 598 // But what if we're opening an existing document?
598 if (!this.application.ninja.documentController.creatingNewFile) { 599 if (!this.application.ninja.documentController.creatingNewFile && this.application.ninja.currentDocument.currentView !== "code") {
599 // Opening an existing document. If it has DOM elements we need to restore their timeline info 600 // Opening an existing document. If it has DOM elements we need to restore their timeline info
600 if (this.application.ninja.currentDocument.documentRoot.children[0]) { 601 if (this.application.ninja.currentDocument.model.documentRoot.children[0]) {
601 // Yes, it has DOM elements. Loop through them and create a new object for each. 602 // Yes, it has DOM elements. Loop through them and create a new object for each.
602 for (myIndex = 0; this.application.ninja.currentDocument.documentRoot.children[myIndex]; myIndex++) { 603 for (myIndex = 0; this.application.ninja.currentDocument.model.documentRoot.children[myIndex]; myIndex++) {
603 this._openDoc = true; 604 this._openDoc = true;
604 this.restoreLayer(this.application.ninja.currentDocument.documentRoot.children[myIndex]); 605 this.restoreLayer(this.application.ninja.currentDocument.model.documentRoot.children[myIndex]);
605 } 606 }
606 } 607 }
607 } 608 }
@@ -1402,12 +1403,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1402 // Trigger the layer/track data binding 1403 // Trigger the layer/track data binding
1403 triggerLayerBinding : { 1404 triggerLayerBinding : {
1404 value: function(intIndex) { 1405 value: function(intIndex) {
1405 if (this.arrLayers[intIndex].layerData.triggerBinding === true) { 1406 this.arrLayers[intIndex].layerData.triggerBinding = !this.arrLayers[intIndex].layerData.triggerBinding;
1406 this.arrLayers[intIndex].layerData.triggerBinding = false; 1407 }
1407 } else {
1408 this.arrLayers[intIndex].layerData.triggerBinding = true;
1409 }
1410 }
1411 }, 1408 },
1412 1409
1413 handleLayerDragStart : { 1410 handleLayerDragStart : {
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 2c15a99c..ff684446 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -405,11 +405,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
405 405
406 triggerOutgoingBinding : { 406 triggerOutgoingBinding : {
407 value: function() { 407 value: function() {
408 if (this.trackData.triggerBinding === true) { 408 this.trackData.triggerBinding = !this.trackData.triggerBinding;
409 this.trackData.triggerBinding = false;
410 } else {
411 this.trackData.triggerBinding = true;
412 }
413 } 409 }
414 }, 410 },
415 411
@@ -438,7 +434,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
438 didDraw:{ 434 didDraw:{
439 value:function () { 435 value:function () {
440 if ((!this.application.ninja.documentController.creatingNewFile)||(!this.application.ninja.currentDocument.setLevel)) { 436 if ((!this.application.ninja.documentController.creatingNewFile)||(!this.application.ninja.currentDocument.setLevel)) {
441 if (this.application.ninja.currentDocument.documentRoot.children[0]) { 437 if (this.application.ninja.currentDocument.model.documentRoot.children[0]) {
442 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 438 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
443 if (selectedIndex !== false) { 439 if (selectedIndex !== false) {
444 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) { 440 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) {
@@ -592,7 +588,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
592 trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); 588 trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration");
593 this.nextKeyframe = 0; 589 this.nextKeyframe = 0;
594 590
595 this.currentKeyframeRule = this.application.ninja.stylesController.getAnimationRuleWithName(this.animationName, this.application.ninja.currentDocument._document); 591 this.currentKeyframeRule = this.application.ninja.stylesController.getAnimationRuleWithName(this.animationName, this.application.ninja.currentDocument.model.views.design.document);
596 592
597 for (i =0; this.currentKeyframeRule[i] ;i++) { 593 for (i =0; this.currentKeyframeRule[i] ;i++) {
598 var newTween = {}; 594 var newTween = {};
diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js
index e028d1db..3ad1763d 100755
--- a/js/panels/components-panel.reel/components-panel.js
+++ b/js/panels/components-panel.reel/components-panel.js
@@ -398,8 +398,8 @@ exports.ComponentsPanel = Montage.create(Component, {
398 //if(!this.centerStage) { 398 //if(!this.centerStage) {
399 var top, left; 399 var top, left;
400 400
401 top = (this.application.ninja.stage.canvas.height / 2); // ~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.documentRoot, "height"))) / 2); 401 top = (this.application.ninja.stage.canvas.height / 2); // ~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.model.documentRoot, "height"))) / 2);
402 left = (this.application.ninja.stage.canvas.width / 2); //~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.documentRoot, "width"))) / 2); 402 left = (this.application.ninja.stage.canvas.width / 2); //~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.model.documentRoot, "width"))) / 2);
403 //this.centerStage = [top, left]; 403 //this.centerStage = [top, left];
404 return [left, top];