diff options
author | Jonathan Duran | 2012-04-04 11:21:46 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-04-04 11:21:46 -0700 |
commit | 04ca16276e73dbd238b42fd898f8b3cccc730f18 (patch) | |
tree | 95aee6605f1018550875812166d292554830d7ca /js/panels | |
parent | 61404b1965ffe7011ec86953f853f0954ccc308d (diff) | |
parent | a11ef2eed7049835c8bdfa50a2b893632c46eaa0 (diff) | |
download | ninja-04ca16276e73dbd238b42fd898f8b3cccc730f18.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
js/tools/SelectionTool.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels')
9 files changed, 26 insertions, 25 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js index ecf0f9cd..2a3fc068 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | |||
@@ -520,9 +520,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre | |||
520 | this.inComputedStyleMode = false; // No computed styles mode for multiple items | 520 | this.inComputedStyleMode = false; // No computed styles mode for multiple items |
521 | 521 | ||
522 | ///// if multiple items are selected, then show common rules | 522 | ///// if multiple items are selected, then show common rules |
523 | var elements = items.map(function(item) { | 523 | var elements = Array.prototype.slice.call(this.application.ninja.selectedElements, 0); |
524 | return item._element; | ||
525 | }); | ||
526 | 524 | ||
527 | ///// show toolbar, but hide computed style button | 525 | ///// show toolbar, but hide computed style button |
528 | this.sections.styles.toolbar.style.display = ''; | 526 | this.sections.styles.toolbar.style.display = ''; |
@@ -538,7 +536,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre | |||
538 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); | 536 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); |
539 | this.sections.styles.showComputedEl.classList.remove('nj-css-panel-hide');// .style.display = ''; | 537 | this.sections.styles.showComputedEl.classList.remove('nj-css-panel-hide');// .style.display = ''; |
540 | this.sections.styles.toolbar.style.display = ''; | 538 | this.sections.styles.toolbar.style.display = ''; |
541 | this.showStylesForElement(items[0]._element, null); | 539 | this.showStylesForElement(items[0], null); |
542 | } else { | 540 | } else { |
543 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); | 541 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); |
544 | this._inMultiSelectMode = false; | 542 | this._inMultiSelectMode = false; |
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index 3505393c..e990551b 100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | |||
@@ -302,7 +302,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
302 | 302 | ||
303 | that.application.ninja.currentDocument.setComponentInstance(instance, element); | 303 | that.application.ninja.currentDocument.setComponentInstance(instance, element); |
304 | 304 | ||
305 | NJevent("elementAdding", {"el": element, "data":styles}); | 305 | that.application.ninja.elementMediator.addElements(element, styles); |
306 | }); | 306 | }); |
307 | 307 | ||
308 | } | 308 | } |
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index df1a25a8..10097805 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -469,9 +469,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
469 | }, | 469 | }, |
470 | 470 | ||
471 | // Bind all document-specific events (pass in true to unbind) | 471 | // Bind all document-specific events (pass in true to unbind) |
472 | _bindDocumentEvents:{ | 472 | _bindDocumentEvents : { |
473 | value:function (boolUnbind) { | 473 | value: function(boolUnbind) { |
474 | var arrEvents = ["elementAdded", "elementDeleted", "selectionChange"], | 474 | var arrEvents = ["deleteLayerClick", |
475 | "newLayer", | ||
476 | "deleteLayer", | ||
477 | "elementAdded", | ||
478 | "elementsRemoved", | ||
479 | "selectionChange"], | ||
475 | i, | 480 | i, |
476 | arrEventsLength = arrEvents.length; | 481 | arrEventsLength = arrEvents.length; |
477 | 482 | ||
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 27828c3c..5410c77c 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -169,7 +169,7 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
169 | 169 | ||
170 | if (event.detail.source && event.detail.source !== "tween") { | 170 | if (event.detail.source && event.detail.source !== "tween") { |
171 | // check for correct element selection | 171 | // check for correct element selection |
172 | if (this.application.ninja.selectedElements[0]._element != this.parentComponent.parentComponent.animatedElement) { | 172 | if (this.application.ninja.selectedElements[0]!= this.parentComponent.parentComponent.animatedElement) { |
173 | console.log("Wrong element selected for this keyframe track"); | 173 | console.log("Wrong element selected for this keyframe track"); |
174 | } else { | 174 | } else { |
175 | // update tweenedProperties and tell containing track to update CSS rule | 175 | // update tweenedProperties and tell containing track to update CSS rule |
diff --git a/js/panels/presets/animations-presets.reel/animations-presets.js b/js/panels/presets/animations-presets.reel/animations-presets.js index 6a16da54..92437cfd 100644 --- a/js/panels/presets/animations-presets.reel/animations-presets.js +++ b/js/panels/presets/animations-presets.reel/animations-presets.js | |||
@@ -23,6 +23,6 @@ exports.AnimationsLibrary = Montage.create(Component, { | |||
23 | handleNodeActivation: { | 23 | handleNodeActivation: { |
24 | value: function(presetData) { | 24 | value: function(presetData) { |
25 | this.application.ninja.presetsController.applyPreset(presetData); | 25 | this.application.ninja.presetsController.applyPreset(presetData); |
26 | } | 26 | } |
27 | } | 27 | } |
28 | }); | 28 | }); |
diff --git a/js/panels/presets/style-presets.reel/style-presets.js b/js/panels/presets/style-presets.reel/style-presets.js index 6a28e069..5f10bbe3 100644 --- a/js/panels/presets/style-presets.reel/style-presets.js +++ b/js/panels/presets/style-presets.reel/style-presets.js | |||
@@ -23,12 +23,12 @@ exports.StylesLibrary = Montage.create(Component, { | |||
23 | handleNodeActivation: { | 23 | handleNodeActivation: { |
24 | value: function(presetData) { | 24 | value: function(presetData) { |
25 | this.application.ninja.presetsController.applyPreset(presetData, true); | 25 | this.application.ninja.presetsController.applyPreset(presetData, true); |
26 | } | 26 | } |
27 | }, | 27 | }, |
28 | handleDragEnd : { | 28 | handleDragEnd : { |
29 | value: function(sourceObject) { | 29 | value: function(sourceObject) { |
30 | console.log(sourceObject); | 30 | console.log(sourceObject); |
31 | } | 31 | } |
32 | } | 32 | } |
33 | 33 | ||
34 | }); | 34 | }); |
diff --git a/js/panels/presets/transitions-presets.reel/transitions-presets.js b/js/panels/presets/transitions-presets.reel/transitions-presets.js index ace38dbb..4ca2a662 100644 --- a/js/panels/presets/transitions-presets.reel/transitions-presets.js +++ b/js/panels/presets/transitions-presets.reel/transitions-presets.js | |||
@@ -23,6 +23,6 @@ exports.TransitionsLibrary = Montage.create(Component, { | |||
23 | handleNodeActivation: { | 23 | handleNodeActivation: { |
24 | value: function(presetData) { | 24 | value: function(presetData) { |
25 | this.application.ninja.presetsController.applyPreset(presetData); | 25 | this.application.ninja.presetsController.applyPreset(presetData); |
26 | } | 26 | } |
27 | } | 27 | } |
28 | }); | 28 | }); |
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 40e9b86a..d5acd503 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -87,7 +87,7 @@ exports.Properties = Montage.create(Component, { | |||
87 | this.displayStageProperties(); | 87 | this.displayStageProperties(); |
88 | } else { | 88 | } else { |
89 | if(this.application.ninja.selectedElements.length === 1) { | 89 | if(this.application.ninja.selectedElements.length === 1) { |
90 | this.displayElementProperties(this.application.ninja.selectedElements[0]._element); | 90 | this.displayElementProperties(this.application.ninja.selectedElements[0]); |
91 | } else { | 91 | } else { |
92 | this.displayGroupProperties(this.application.ninja.selectedElements); | 92 | this.displayGroupProperties(this.application.ninja.selectedElements); |
93 | } | 93 | } |
@@ -120,7 +120,6 @@ exports.Properties = Montage.create(Component, { | |||
120 | } else if(event.target.id === "elementClass") { | 120 | } else if(event.target.id === "elementClass") { |
121 | if(this.application.ninja.selectedElements.length) { | 121 | if(this.application.ninja.selectedElements.length) { |
122 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); | 122 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); |
123 | console.log(this.application.ninja.selectedElements[0]._element.className); | ||
124 | } else { | 123 | } else { |
125 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); | 124 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); |
126 | } | 125 | } |
@@ -138,8 +137,8 @@ exports.Properties = Montage.create(Component, { | |||
138 | 137 | ||
139 | handleElementChanging: { | 138 | handleElementChanging: { |
140 | value: function(event) { | 139 | value: function(event) { |
141 | // this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "left")); | 140 | // this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0], "left")); |
142 | // this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "top")); | 141 | // this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0], "top")); |
143 | } | 142 | } |
144 | }, | 143 | }, |
145 | 144 | ||
@@ -148,23 +147,22 @@ exports.Properties = Montage.create(Component, { | |||
148 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update | 147 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update |
149 | if(event.detail.source && event.detail.source !== "pi") { | 148 | if(event.detail.source && event.detail.source !== "pi") { |
150 | // TODO - This should only update the properties that were changed. | 149 | // TODO - This should only update the properties that were changed. |
151 | var el = this.application.ninja.selectedElements[0]._element || this.application.ninja.selectedElements[0]; | 150 | var el = this.application.ninja.selectedElements[0]; |
152 | this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); | 151 | this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); |
153 | this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); | 152 | this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); |
154 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); | 153 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); |
155 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); | 154 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); |
156 | 155 | ||
157 | if(this.threeD.inGlobalMode) | 156 | if(this.threeD.inGlobalMode) { |
158 | { | ||
159 | this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); | 157 | this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); |
160 | this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D"); | 158 | this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D"); |
161 | this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D"); | 159 | this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D"); |
162 | this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle"); | 160 | this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle"); |
163 | this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle"); |