From 0e1a276f19ea70009c5a649e9667861d7c346a7e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 6 Jun 2012 00:25:27 -0700 Subject: first iteration of adding serializable to ninja plus other changes to run the latest montage Signed-off-by: Valerio Virgillito --- .../materials-library-panel.js | 3 +- js/panels/Panel.reel/Panel.html | 1 - js/panels/Panel.reel/Panel.js | 8 +- js/panels/PanelContainer.reel/PanelContainer.js | 48 +++++++- js/panels/Resizer.js | 13 ++- js/panels/Splitter.js | 9 +- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 122 ++++++++++++++++++--- .../components-panel.reel/components-panel.html | 3 +- js/panels/css-panel/css-panel.reel/css-panel.js | 10 ++ js/panels/css-panel/css-style.reel/css-style.html | 2 +- .../css-style-rule.reel/css-style-rule.html | 2 +- .../rule-list-container.js | 10 ++ js/panels/css-panel/rule-list.reel/rule-list.js | 5 + .../style-declaration.reel/style-declaration.html | 6 +- .../style-sheets-view.reel/style-sheets-view.js | 13 ++- .../styles-view-container.html | 1 - .../styles-view-container.js | 19 ++++ js/panels/css-panel/styles-view-delegate.js | 6 + js/panels/presets/content.reel/content.js | 15 ++- js/panels/properties.reel/properties.html | 9 +- js/panels/properties.reel/properties.js | 19 +++- js/panels/properties.reel/section.reel/section.js | 9 +- .../sections/position-size.reel/position-size.html | 9 +- .../sections/position-size.reel/position-size.js | 41 +++++++ .../sections/three-d-view.reel/three-d-view.html | 2 - .../sections/three-d-view.reel/three-d-view.js | 55 ++++++++++ js/panels/resize-composer.js | 6 +- 27 files changed, 388 insertions(+), 58 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js index 2176c6d5..c600fd0d 100755 --- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js @@ -68,7 +68,8 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { }, _materialInfo: { - enumerable:true + enumerable:true, + serializable: true }, _showMaterialPopup: { diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html index f0fb1044..5937b58f 100755 --- a/js/panels/Panel.reel/Panel.html +++ b/js/panels/Panel.reel/Panel.html @@ -75,7 +75,6 @@ "prototype": "montage/ui/button.reel", "properties": { "element": {"#": "btnClose"}, - "pressedClass": "hide", "identifier": "btnClose" }, "listeners": [ diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 0c5f0b4b..fde5c962 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -13,6 +13,11 @@ exports.Panel = Montage.create(Component, { value: "Panel" }, + panelContent: { + value: null, + serializable: true + }, + _collapsed: { value: false }, @@ -46,7 +51,8 @@ exports.Panel = Montage.create(Component, { }, resizer: { - value: null + value: null, + serializable: true }, modulePath: { diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index 7cb03255..5c733b92 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js @@ -12,8 +12,54 @@ var Montage = require("montage/core/core").Montage, exports.PanelContainer = Montage.create(Component, { + panelSplitter: { + value: null, + serializable: true + }, + + appModel: { + value: null, + serializable: true + }, + panelData: { - value: null + value: null, + serializable: true + }, + + panel_0: { + value: null, + serializable: true + }, + + panel_1: { + value: null, + serializable: true + }, + + panel_2: { + value: null, + serializable: true + }, + + panel_3: { + value: null, + serializable: true + }, + + panel_4: { + value: null, + serializable: true + }, + + panel_5: { + value: null, + serializable: true + }, + + panel_6: { + value: null, + serializable: true }, _currentDocument: { diff --git a/js/panels/Resizer.js b/js/panels/Resizer.js index 0252c4fb..0f4c39f7 100755 --- a/js/panels/Resizer.js +++ b/js/panels/Resizer.js @@ -54,7 +54,8 @@ exports.Resizer = Montage.create(Component, { }, set: function(val) { this._isInversed = val; - } + }, + serializable: true }, _isVertical: { @@ -67,7 +68,8 @@ exports.Resizer = Montage.create(Component, { }, set: function(val) { this._isVertical = val; - } + }, + serializable: true }, _isPanel: { @@ -79,8 +81,10 @@ exports.Resizer = Montage.create(Component, { }, set: function(value) { this._isPanel = value; - } + }, + serializable: true }, + _panel : { value: null }, @@ -92,7 +96,8 @@ exports.Resizer = Montage.create(Component, { set: function(val) { this._panel = val; if(val._element) this._panel = val._element; - } + }, + serializable: true }, height: { diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index f0fb1a45..15865acc 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -18,8 +18,7 @@ exports.Splitter = Montage.create(Component, { }, _panel: { - value: null, - enumerable:true + value: null }, panel: { @@ -28,7 +27,8 @@ exports.Splitter = Montage.create(Component, { }, set: function(value) { this._panel = value; - } + }, + serializable: true }, _resizeBar: { @@ -41,7 +41,8 @@ exports.Splitter = Montage.create(Component, { }, set: function(val) { this._resizeBar = val; - } + }, + serializable: true }, _collapsed : { diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 6e9513f2..7af88662 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -10,10 +10,98 @@ var nj = require("js/lib/NJUtils").NJUtils; var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { - hasTemplate:{ - value:true + user_layers: { + value: null, + serializable: true + }, + + track_container: { + value: null, + serializable: true + }, + + timeline_leftpane: { + value: null, + serializable: true + }, + + layer_tracks: { + value: null, + serializable: true + }, + + master_track: { + value: null, + serializable: true + }, + + time_markers: { + value: null, + serializable: true + }, + + playhead: { + value: null, + serializable: true + }, + + playheadmarker: { + value: null, + serializable: true + }, + + timetext: { + value: null, + serializable: true + }, + + timebar: { + value: null, + serializable: true + }, + + container_tracks: { + value: null, + serializable: true }, + end_hottext: { + value: null, + serializable: true + }, + + container_layers: { + value: null, + serializable: true + }, + + timeline_disabler: { + value: null, + serializable: true + }, + + checkable_relative: { + value: null, + serializable: true + }, + + checkable_absolute: { + value: null, + serializable: true + }, + + checkable_animated: { + value: null, + serializable: true + }, + + tl_configbutton: { + value: null, + serializable: true + }, + + + /* === BEGIN: Models === */ _currentDocument: { value : null @@ -90,7 +178,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - } + }, + serializable: true }, // Set to false to skip array caching array sets in current document @@ -234,7 +323,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._trackRepetition = newVal; - } + }, + serializable: true }, _selectedKeyframes:{ @@ -488,11 +578,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. - this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; - this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + if(this.currentDocument) { + this.currentDocument.tlArrLayers = this.arrLayers; + this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.currentDocument.tllayerNumber = this.currentLayerNumber; + this.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; + this.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + } } } }, @@ -500,12 +592,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { initTimelineCache: { value: function() { // Initialize the currentDocument for a new set of timeline data. - this.application.ninja.currentDocument.isTimelineInitialized = true; - this.application.ninja.currentDocument.tlArrLayers = []; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = false; - this.application.ninja.currentDocument.tlCurrentLayersSelected = false; + this.currentDocument.isTimelineInitialized = true; + this.currentDocument.tlArrLayers = []; + this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.currentDocument.tllayerNumber = this.currentLayerNumber; + this.currentDocument.tlCurrentLayerSelected = false; + this.currentDocument.tlCurrentLayersSelected = false; } }, diff --git a/js/panels/components-panel.reel/components-panel.html b/js/panels/components-panel.reel/components-panel.html index 1a257957..a8d71d50 100755 --- a/js/panels/components-panel.reel/components-panel.html +++ b/js/panels/components-panel.reel/components-panel.html @@ -14,8 +14,7 @@ "owner": { "prototype": "js/panels/components-panel.reel", "properties": { - "element": {"#": "components_panel"}, - "controller": {"@": "componentsTree"} + "element": {"#": "components_panel"} } }, diff --git a/js/panels/css-panel/css-panel.reel/css-panel.js b/js/panels/css-panel/css-panel.reel/css-panel.js index 96d94b36..a2a288c9 100644 --- a/js/panels/css-panel/css-panel.reel/css-panel.js +++ b/js/panels/css-panel/css-panel.reel/css-panel.js @@ -9,6 +9,16 @@ var Montage = require("montage/core/core").Montage, exports.CssPanel = Montage.create(Component, { + styleSheetsView: { + value: null, + serializable: true + }, + + stylesViewContainer: { + value: null, + serializable: true + }, + _currentDocument: { value : null }, diff --git a/js/panels/css-panel/css-style.reel/css-style.html b/js/panels/css-panel/css-style.reel/css-style.html index 00cebf39..0f16b3d8 100644 --- a/js/panels/css-panel/css-style.reel/css-style.html +++ b/js/panels/css-panel/css-style.reel/css-style.html @@ -30,7 +30,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "checked": true }, "bindings": { - "checked" : {"<<->": "@owner.enabled" } + "checked" : {"<->": "@owner.enabled" } } }, "property": { diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html index f203b61f..9aab5649 100644 --- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html +++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html @@ -34,7 +34,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "element": {"#": "rule-selector"} }, "bindings": { - "value" : {"<<->":"@owner.selector" } + "value" : {"<->":"@owner.selector" } } }, "declaration": { diff --git a/js/panels/css-panel/rule-list-container.reel/rule-list-container.js b/js/panels/css-panel/rule-list-container.reel/rule-list-container.js index c7766d08..509ca565 100644 --- a/js/panels/css-panel/rule-list-container.reel/rule-list-container.js +++ b/js/panels/css-panel/rule-list-container.reel/rule-list-container.js @@ -8,6 +8,16 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.RuleListContainer = Montage.create(Component, { + focusDelegate: { + value: null, + serializable: true + }, + + ruleListComponent: { + value: null, + serializable: true + }, + _instanceToAdd : { value: null }, _appendElement : { value: null }, _lastDisplayedList : { value: null }, diff --git a/js/panels/css-panel/rule-list.reel/rule-list.js b/js/panels/css-panel/rule-list.reel/rule-list.js index 3e18c3bf..27d74b2f 100644 --- a/js/panels/css-panel/rule-list.reel/rule-list.js +++ b/js/panels/css-panel/rule-list.reel/rule-list.js @@ -8,6 +8,11 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.RuleList = Montage.create(Component, { + supportedRules: { + value: null, + serializable: true + }, + focusDelegate : { value: null }, ruleNodeName : { value: 'li' }, _needsScrollToBottom: { value: null }, diff --git a/js/panels/css-panel/style-declaration.reel/style-declaration.html b/js/panels/css-panel/style-declaration.reel/style-declaration.html index fad54453..4cdf0741 100644 --- a/js/panels/css-panel/style-declaration.reel/style-declaration.html +++ b/js/panels/css-panel/style-declaration.reel/style-declaration.html @@ -43,9 +43,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot }, "bindings": { "source": {"<-": "@repetition.objectAtCurrentIteration" }, - "propertyText": {"<<->": "@repetition.objectAtCurrentIteration.name" }, - "valueText": {"<<->": "@repetition.objectAtCurrentIteration.value" }, - "empty": {"<<->": "@repetition.objectAtCurrentIteration.isEmpty" }, + "propertyText": {"<->": "@repetition.objectAtCurrentIteration.name" }, + "valueText": {"<->": "@repetition.objectAtCurrentIteration.value" }, + "empty": {"<->": "@repetition.objectAtCurrentIteration.isEmpty" }, "delegate": {"<-": "@owner.focusDelegate" } } } diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js index 9e3b4a49..c090a1fc 100644 --- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js +++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js @@ -8,13 +8,24 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.StyleSheetsView = Montage.create(Component, { + + toolbar: { + value: null, + serializable: true + }, + + styleSheetList: { + value: null, + serializable: true + }, + documentLoaded : { value: false }, showToolbar : { value: false }, stylesController : { value: null }, styleSheets : { value: [] }, _initView : { value: false }, _needsScroll : { value: false }, - documentNameLabel : { value: null }, + documentNameLabel : { value: null, serializable: true }, noDocumentLabelClass : { value: "no-document" }, _activeDocument: { diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.html b/js/panels/css-panel/styles-view-container.reel/styles-view-container.html index 93ac3793..150f20fa 100644 --- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.html +++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.html @@ -16,7 +16,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "element" : {"#" : "container"}, "ruleListContainer": {"@": "ruleListContainer" }, "computedStyleView": {"@": "computedStyleView" }, - "substitution": {"@": "substitution" }, "delegate": {"@": "stylesViewDelegate"}, "toolbar": {"@": "toolbar"} } diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js index 157d99de..153e74b6 100644 --- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js +++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js @@ -9,6 +9,21 @@ var Montage = require("montage/core/core").Montage, exports.StylesViewContainer = Montage.create(Component, { + ruleListContainer: { + value: null, + serializable: true + }, + + computedStyleView: { + value: null, + serializable: true + }, + + toolbar: { + value: null, + serializable: true + }, + _currentDocument: { value : null }, @@ -37,6 +52,10 @@ exports.StylesViewContainer = Montage.create(Component, { contentPanel : { value: 'rules' }, + selectionName: { + value: null, + serializable: true + }, _selectionNameLabelText : { value: null }, diff --git a/js/panels/css-panel/styles-view-delegate.js b/js/panels/css-panel/styles-view-delegate.js index 87686826..a7c1f0d9 100644 --- a/js/panels/css-panel/styles-view-delegate.js +++ b/js/panels/css-panel/styles-view-delegate.js @@ -9,6 +9,12 @@ var Montage = require("montage/core/core").Montage, Keyboard = require("js/mediators/keyboard-mediator").Keyboard; exports.StylesViewDelegate = Montage.create(Component, { + + ruleListContainer: { + value: null, + serializable: true + }, + newClassPrefix : { value: "new-class" }, elementOutlineClass : { value: "nj-element-highlight" }, diff --git a/js/panels/presets/content.reel/content.js b/js/panels/presets/content.reel/content.js index 1ede7246..eba150c3 100644 --- a/js/panels/presets/content.reel/content.js +++ b/js/panels/presets/content.reel/content.js @@ -14,6 +14,10 @@ exports.content = Montage.create(Component, { contentPanel : { value: null }, + activeTabIndex: { + value: null, + serializable: true + }, templateDidLoad : { value: function() { var storedTabIndex = this.application.localStorage.getItem("presetsTabIndex"); @@ -55,7 +59,16 @@ exports.content = Montage.create(Component, { this._activeTab = tabObject; this.needsDraw = this._needsTabSwitch = true; - } + }, + serializable: true + }, + tabBar: { + value: null, + serializable: true + }, + tabs:{ + value: null, + serializable: true }, _tabToDeactivate : { value: null, diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html index b9aa206b..a737bd39 100755 --- a/js/panels/properties.reel/properties.html +++ b/js/panels/properties.reel/properties.html @@ -13,24 +13,21 @@ "elementName": { "prototype": "montage/ui/textfield.reel", "properties": { - "element": {"#": "elementName"}, - "readOnly": true + "element": {"#": "elementName"} } }, "elementId": { "prototype": "montage/ui/textfield.reel", "properties": { - "element": {"#": "elementId"}, - "readOnly": false + "element": {"#": "elementId"} } }, "elementClass": { "prototype": "montage/ui/textfield.reel", "properties": { - "element": {"#": "elementClass"}, - "readOnly": false + "element": {"#": "elementClass"} } }, diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 934a3851..0017b54f 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -43,15 +43,28 @@ exports.Properties = Montage.create(Component, { }, elementName: { - value: null + value: null, + serializable: true }, elementId: { - value: null + value: null, + serializable: true }, elementClass: { - value: null + value: null, + serializable: true + }, + + positionSize: { + value: null, + serializable: true + }, + + threeD: { + value: null, + serializable: true }, customSections: { diff --git a/js/panels/properties.reel/section.reel/section.js b/js/panels/properties.reel/section.reel/section.js index b246c171..1873eb8c 100755 --- a/js/panels/properties.reel/section.reel/section.js +++ b/js/panels/properties.reel/section.reel/section.js @@ -10,15 +10,18 @@ var Component = require("montage/ui/component").Component; exports.Section = Montage.create(Component, { name: { - value: "Panel" + value: "Panel", + serializable: true }, slot: { - value: null + value: null, + serializable: true }, content: { - value: null + value: null, + serializable: true }, prepareForDraw: { diff --git a/js/panels/properties.reel/sections/position-size.reel/position-size.html b/js/panels/properties.reel/sections/position-size.reel/position-size.html index 5d1a805a..ccc7a159 100755 --- a/js/panels/properties.reel/sections/position-size.reel/position-size.html +++ b/js/panels/properties.reel/sections/position-size.reel/position-size.html @@ -32,7 +32,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "minValue": -10000 }, "bindings": { - "value": {"<<->": "@owner.leftPosition"} + "value": {"<->": "@owner.leftPosition"} } }, "PosY": { @@ -43,7 +43,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "minValue": -10000 }, "bindings": { - "value": {"<<->": "@owner.topPosition"} + "value": {"<->": "@owner.topPosition"} } }, @@ -53,7 +53,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "element": {"#": "PosH"} }, "bindings": { - "value": {"<<->": "@owner.heightSize"} + "value": {"<->": "@owner.heightSize"} } }, @@ -65,7 +65,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "units": "px" }, "bindings": { - "value": {"<<->": "@owner.widthSize"} + "value": {"<->": "@owner.widthSize"} } }, @@ -74,7 +74,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "posBound"}, "pressedClass": "lockUp", - "preventFocus": true, "identifier": "ratio" } } diff --git a/js/panels/properties.reel/sections/position-size.reel/position-size.js b/js/panels/properties.reel/sections/position-size.reel/position-size.js index 7c24e02a..fef2b195 100755 --- a/js/panels/properties.reel/sections/position-size.reel/position-size.js +++ b/js/panels/properties.reel/sections/position-size.reel/position-size.js @@ -8,6 +8,47 @@ var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; exports.PositionSize = Montage.create(Component, { + + position: { + value: null, + serializable: true + }, + + leftLabel: { + value: null, + serializable: true + }, + + leftControl: { + value: null, + serializable: true + }, + + topLabel: { + value: null, + serializable: true + }, + + topControl: { + value: null, + serializable: true + }, + + heightControl: { + value: null, + serializable: true + }, + + widthControl: { + value: null, + serializable: true + }, + + bindButton: { + value: null, + serializable: true + }, + leftPosition: { value: 0 }, diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html index 5ef13fab..572e5a60 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html @@ -219,7 +219,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "rdioLocal"}, "label": "Local", - "value": "Local", "group": {"@": "axisModeGroup"}, "checked": true } @@ -229,7 +228,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "rdioGlobal"}, "label": "Global", - "value": "Global", "group": {"@": "axisModeGroup"} } }, diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 104d474d..70fca99b 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js @@ -51,6 +51,61 @@ exports.ThreeD = Montage.create(Component, { } }, + x3DControl: { + value: null, + serializable: true + }, + + y3DControl: { + value: null, + serializable: true + }, + + z3DControl: { + value: null, + serializable: true + }, + + x3DLabel: { + value: null, + serializable: true + }, + + y3DLabel: { + value: null, + serializable: true + }, + + z3DLabel: { + value: null, + serializable: true + }, + + xAngleControl: { + value: null, + serializable: true + }, + + yAngleControl: { + value: null, + serializable: true + }, + + zAngleControl: { + value: null, + serializable: true + }, + + axisModeGroupControl: { + value: null, + serializable: true + }, + + flattenControl: { + value: null, + serializable: true + }, + x3D: { value: 0 }, diff --git a/js/panels/resize-composer.js b/js/panels/resize-composer.js index 0d1774cd..fe09aec8 100644 --- a/js/panels/resize-composer.js +++ b/js/panels/resize-composer.js @@ -10,11 +10,13 @@ var Composer = require("montage/ui/composer/composer").Composer; exports.ResizeComposer = Montage.create(Composer, { xAxis: { - value: true + value: true, + serializable: true }, yAxis: { - value: true + value: true, + serializable: true }, enabled : { -- cgit v1.2.3 From 806974142d44afdd23534bf2d18eff0a8e701e0c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 8 Jun 2012 16:59:59 -0700 Subject: rewrite: currentSelectedContainer -> domContainer Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index d7329ac7..f7ab5117 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -53,6 +53,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { } } }, + + handleChange: { + value: function() { + if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) { + this.currentSelectedContainer = this.currentDocument.model.getProperty("domContainer"); + } + } + }, _currentSelectedContainer: { value: null @@ -405,13 +413,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.tl_configbutton.addEventListener("click", this.handleConfigButtonClick.bind(this), false); document.addEventListener("click", this.handleDocumentClick.bind(this), false); - - // Bind some bindings - Object.defineBinding(this, "currentSelectedContainer", { - boundObject:this.application.ninja, - boundObjectPropertyPath:"currentSelectedContainer", - oneway:true - }); + this.addPropertyChangeListener("currentDocument.model.domContainer", this); } }, @@ -512,7 +514,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { if (this._boolCacheArrays) { // ... but only if we're supposed to. this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; @@ -525,7 +527,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Initialize the currentDocument for a new set of timeline data. this.application.ninja.currentDocument.isTimelineInitialized = true; this.application.ninja.currentDocument.tlArrLayers = []; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; this.application.ninja.currentDocument.tlCurrentLayerSelected = false; this.application.ninja.currentDocument.tlCurrentLayersSelected = false; @@ -669,7 +671,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // console.log('TimelinePanel.initTimelineForDocument: breadCrumbClick'); // Information stored, but we're moving up or down in the breadcrumb. // Get the current selection and restore timeline info for its children. - var parentNode = this.application.ninja.currentSelectedContainer, + var parentNode = this.currentDocument.model.domContainer, storedCurrentLayerNumber = this.application.ninja.currentDocument.tllayerNumber; this.temparrLayers = []; @@ -708,7 +710,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { //debugger; if (typeof(this.application.ninja.currentDocument.tlCurrentSelectedContainer) !== "undefined") { -// this.application.ninja.currentSelectedContainer=this.application.ninja.currentDocument.tlCurrentSelectedContainer; +// this.currentDocument.model.domContainer = this.application.ninja.currentDocument.tlCurrentSelectedContainer; } // Are we only showing animated layers? @@ -984,7 +986,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { thingToPush.layerData.layerName = newLayerName; thingToPush.layerData.layerTag = "<" + object.nodeName.toLowerCase() + ">"; thingToPush.layerData.layerID = this.currentLayerNumber; - thingToPush.parentElement = this.application.ninja.currentSelectedContainer; + thingToPush.parentElement = this.currentDocument.model.domContainer; thingToPush.layerData.isSelected = true; thingToPush.layerData._isFirstDraw = true; thingToPush.layerData.created = true; @@ -1032,7 +1034,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { thingToPush.layerData.layerName = newLayerName; thingToPush.layerData.layerID = this.currentLayerNumber; thingToPush.layerData.layerTag = "<" + ele.nodeName.toLowerCase() + ">"; - thingToPush.parentElement = this.application.ninja.currentSelectedContainer; + thingToPush.parentElement = this.currentDocument.model.domContainer; if (this.checkable_animated.classList.contains("checked")) { thingToPush.layerData.isVisible = false; } -- cgit v1.2.3 From 007676e50a23bbc714fa56c7e1917a281fd3a67b Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 11 Jun 2012 13:55:24 -0700 Subject: IKNinja-1377 - Global rotation does not work if object is translated in z. Signed-off-by: Nivesh Rajbhandari --- .../sections/three-d-view.reel/three-d-view.js | 66 +++++++++++++++++++--- 1 file changed, 59 insertions(+), 7 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 104d474d..478a6de5 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js @@ -5,7 +5,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot */ var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; + Component = require("montage/ui/component").Component, + viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils, + drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils; exports.ThreeD = Montage.create(Component, { @@ -107,6 +109,10 @@ exports.ThreeD = Montage.create(Component, { value: null }, + _transformCtr: { + value: null + }, + handleAction: { value: function(event) { if(event.currentTarget.identifier === "flatten") { @@ -143,10 +149,20 @@ exports.ThreeD = Montage.create(Component, { value : function(prop, value, item, inGlobalMode, isChanging){ if(!this._curMat) { this._curMat = this.application.ninja.elementMediator.getMatrix(item); +// this._transformCtr = item.elementModel.props3D.m_transformCtr || [0,0,0]; + // TODO - Always use the center for now until we support multiple selections + this._transformCtr = [0,0,0]; + if(inGlobalMode) { + this._transformCtr = MathUtils.transformPoint(this._transformCtr, this._curMat); + } } - var curMat = this._curMat; - var delta = value.value; + var curMat = this._curMat, + delta = value.value, + isRotating = false, + xFormMat = Matrix.I(4), + tMat = Matrix.I(4), + mat = []; if(inGlobalMode) { if(!this._curProp) { @@ -156,17 +172,19 @@ exports.ThreeD = Montage.create(Component, { delta -= this._curProp; } - var xFormMat = Matrix.I(4); switch (prop) { case "xAngle": xFormMat = Matrix.RotationX(MathUtils.DEG_TO_RAD * delta); + isRotating = true; break; case "yAngle": xFormMat = Matrix.RotationY(MathUtils.DEG_TO_RAD * delta); + isRotating = true; break; case "zAngle": xFormMat = Matrix.RotationZ(MathUtils.DEG_TO_RAD * delta); + isRotating = true; break; case "x3D": xFormMat[12] = delta; @@ -179,11 +197,45 @@ exports.ThreeD = Montage.create(Component, { break; } - var mat = []; if(inGlobalMode) { - glmat4.multiply(xFormMat, curMat, mat); + + if(isRotating) { + + // pre-translate by the transformation center + tMat[12] = this._transformCtr[0]; + tMat[13] = this._transformCtr[1]; + tMat[14] = this._transformCtr[2]; + + glmat4.multiply(tMat, xFormMat, mat); + + // translate back + tMat[12] = -this._transformCtr[0]; + tMat[13] = -this._transformCtr[1]; + tMat[14] = -this._transformCtr[2]; + + glmat4.multiply(mat, tMat, mat); + glmat4.multiply(mat, curMat, mat); + } else { + glmat4.multiply(xFormMat, curMat, mat); + } } else { - glmat4.multiply(curMat, xFormMat, mat); + if(isRotating) { + tMat[12] = this._transformCtr[0]; + tMat[13] = this._transformCtr[1]; + tMat[14] = this._transformCtr[2]; + + glmat4.multiply(curMat, tMat, mat); + + // translate back + tMat[12] = -this._transformCtr[0]; + tMat[13] = -this._transformCtr[1]; + tMat[14] = -this._transformCtr[2]; + + glmat4.multiply(mat, xFormMat, mat); + glmat4.multiply(mat, tMat, mat); + } else { + glmat4.multiply(curMat, xFormMat, mat); + } } if(isChanging) { -- cgit v1.2.3 From 71ee5770ff83a27f874084a11d269f3d7f1fd9ca Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 11 Jun 2012 14:26:10 -0700 Subject: Removing unused requires from 3d PI section. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 478a6de5..101ca705 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js @@ -5,9 +5,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot */ var Montage = require("montage/core/core").Montage; - Component = require("montage/ui/component").Component, - viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils, - drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils; + Component = require("montage/ui/component").Component; exports.ThreeD = Montage.create(Component, { -- cgit v1.2.3 From cc0662909639d6635d5e1c4df0bacc55d94c9f5e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 11 Jun 2012 14:28:11 -0700 Subject: Fixing typo. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 101ca705..f8d158ce 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js @@ -4,7 +4,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ -var Montage = require("montage/core/core").Montage; +var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.ThreeD = Montage.create(Component, { -- cgit v1.2.3 From 1b510d86ebdd3cb58162e20cb9412e93d6f473c1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 11 Jun 2012 23:47:29 -0700 Subject: adding more missing properties Signed-off-by: Valerio Virgillito --- .../css-panel/style-sheet.reel/style-sheet.js | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'js/panels') diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.js b/js/panels/css-panel/style-sheet.reel/style-sheet.js index cb69d25b..8ce8da0e 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.js +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js @@ -8,6 +8,37 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; exports.StyleSheet = Montage.create(Component, { + + nameText: { + value: null, + serializable: true + }, + + mediaInput: { + value: null, + serializable: true + }, + + editButton: { + value: null, + serializable: true + }, + + editView: { + value: null, + serializable: true + }, + + disableButton: { + value: null, + serializable: true + }, + + deleteButton: { + value: null, + serializable: true + }, + _translateDistance: { value: null }, -- cgit v1.2.3 From 844d59d85a1881525c79a1f44a35a9ea59e70e4a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:02:22 -0700 Subject: removing the serializable from the timeline repetition and fixing the panels currentDocument binding Signed-off-by: Valerio Virgillito --- js/panels/Panel.reel/Panel.js | 4 ++-- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index fde5c962..15eb4da9 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -122,8 +122,8 @@ exports.Panel = Montage.create(Component, { this._currentDocument = value; - if(typeof this.panelContent.content[0].controller._currentDocument !== "undefined") { - this.panelContent.content[0].controller.currentDocument = this._currentDocument; + if(typeof this.panelContent.content._element.controller._currentDocument !== "undefined") { + this.panelContent.content._element.controller.currentDocument = this._currentDocument; } if(!value) { diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 658ac043..36b868d0 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -221,8 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - }, - serializable: true + }, }, // Set to false to skip array caching array sets in current document @@ -346,8 +345,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._trackRepetition = newVal; - }, - serializable: true + } }, _selectedKeyframes:{ @@ -603,11 +601,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. - this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; - this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + if(this.currentDocument) { + this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; + this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; + this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; + this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; + this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + } } } }, -- cgit v1.2.3 From 5e010900b91d8634ba6caed0c97ccc1ccdec1ff7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:13:28 -0700 Subject: adding more missing properties to the timeline Signed-off-by: Valerio Virgillito --- js/panels/Timeline/Layer.reel/Layer.js | 38 ++++++++++++++++++++-- js/panels/Timeline/Style.reel/Style.js | 30 ++++++++++++++--- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 4 +-- js/panels/Timeline/Track.reel/Track.js | 5 +-- js/panels/Timeline/Tween.reel/Tween.js | 10 ++++-- 5 files changed, 74 insertions(+), 13 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 16fb0303..474190b9 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -15,8 +15,39 @@ var nj = require("js/lib/NJUtils").NJUtils; var Layer = exports.Layer = Montage.create(Component, { - hasTemplate:{ - value: true + dynamicLayerName: { + value: null, + serializable: true + }, + + dynamicLayerTag: { + value: null, + serializable: true + }, + + positionCollapser: { + value: null, + serializable: true + }, + + transformCollapser: { + value: null, + serializable: true + }, + + styleCollapser: { + value: null, + serializable: true + }, + + clickerMain: { + value: null, + serializable: true + }, + + myLabel: { + value: null, + serializable: true }, /* Begin: Models */ @@ -31,7 +62,8 @@ var Layer = exports.Layer = Montage.create(Component, { }, set: function(newVal) { this._mainCollapser = newVal; - } + }, + serializable: true }, /* Style models: the array of styles, and the repetition that uses them */ diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js index c39f3a56..eed58a65 100644 --- a/js/panels/Timeline/Style.reel/Style.js +++ b/js/panels/Timeline/Style.reel/Style.js @@ -20,10 +20,31 @@ var Component = require("montage/ui/component").Component; var LayerStyle = exports.LayerStyle = Montage.create(Component, { - hasTemplate:{ - value: true + styleContainer: { + value: null, + serializable: true }, - + + styleHintable: { + value: null, + serializable: true + }, + + styleProperty: { + value: null, + serializable: true + }, + + valueEditorHottext: { + value: null, + serializable: true + }, + + dtextProperty: { + value: null, + serializable: true + }, + /* === BEGIN: Models === */ // isSelected: whether or not the style is selected _isSelected: { @@ -112,7 +133,8 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { }, set: function(newVal) { this._myHintable = newVal; - } + }, + serializable: true }, _myHintableValue : { value: null diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 126e6a61..7cfe07a6 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -11,8 +11,8 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { - hasTemplate:{ - value:true + tween: { + value: null }, _trackID:{ diff --git a/js/panels/Timeline/Track.reel/Track.js b/js/panels/Timeline/Track.reel/Track.js index 8c52199a..2ef760b7 100644 --- a/js/panels/Timeline/Track.reel/Track.js +++ b/js/panels/Timeline/Track.reel/Track.js @@ -10,8 +10,9 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve var Track = exports.Track = Montage.create(Component, { - hasTemplate:{ - value: true + track_lane: { + value: null, + serializable: true }, _trackID:{ diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 8b6826ed..dda06028 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -9,8 +9,14 @@ var Component = require("montage/ui/component").Component; var Tween = exports.Tween = Montage.create(Component, { - hasTemplate:{ - value: true + keyframe: { + value: null, + serializable: true + }, + + tweenspan: { + value: null, + serializable: true }, _tweenData:{ -- cgit v1.2.3 From 8e5536bddb9f9f991e1d5ed363d253879a159a28 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:20:47 -0700 Subject: fixing a timeline issue Signed-off-by: Valerio Virgillito --- js/panels/Timeline/Layer.reel/Layer.js | 5 ----- 1 file changed, 5 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 474190b9..ed0200ae 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -15,11 +15,6 @@ var nj = require("js/lib/NJUtils").NJUtils; var Layer = exports.Layer = Montage.create(Component, { - dynamicLayerName: { - value: null, - serializable: true - }, - dynamicLayerTag: { value: null, serializable: true -- cgit v1.2.3 From 0a5ce26ee62b74261e1b00877b7e43af0e681856 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 12 Jun 2012 10:10:11 -0700 Subject: Timeline: Fix document switching under Montage v.10 --- js/panels/Timeline/Layer.reel/Layer.js | 1 + .../Timeline/TimelinePanel.reel/TimelinePanel.js | 3 +++ .../Timeline/TimelineTrack.reel/TimelineTrack.js | 28 +++++++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index ed0200ae..6b64261e 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -456,6 +456,7 @@ var Layer = exports.Layer = Montage.create(Component, { }, layerData:{ + serializable: true, get:function(){ return this._layerData; }, diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 36b868d0..65476d6b 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -783,6 +783,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { var i = 0, tlArrLayersLength = this.application.ninja.currentDocument.tlArrLayers.length; + + this._ignoreNextContainerChange = true; + // We're reading from the cache, not writing to it. this._boolCacheArrays = false; for (i = 0; i < tlArrLayersLength; i++) { diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 7cfe07a6..75997466 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -155,7 +155,11 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }, set: function(newVal) { this._arrPositionTracks = newVal; - this.trackData.arrPositionTracks = newVal; + if (typeof(this.trackData) === "undefined") { + //this.createTrackData(); + } + this.trackData.arrPositionTracks = newVal; + } }, _positionTracksRepetition: { @@ -348,6 +352,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }, trackData:{ + serializable: true, get:function(){ return this._trackData; }, @@ -386,6 +391,27 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.needsDraw = true; } }, + createTrackData: { + value: function() { + tempData = {}; + tempData.bypassAnimation = this.bypassAnimation; + tempData.trackID = this.layerID; + tempData.tweens = this.tweens; + tempData.animatedElement = this.animatedElement; + tempData.arrStyleTracks = this.arrStyleTracks; + tempData.isTrackAnimated = this.isTrackAnimated; + tempData.trackDuration = this.trackDuration; + tempData.animationName = this.animationName; + tempData.currentKeyframeRule = this.currentKeyframeRule; + tempData.isMainCollapsed = this.isMainCollapsed; + tempData.isPositionCollapsed = this.isPositionCollapsed; + tempData.isTransformCollapsed = this.isTransformCollapsed; + tempData.isStyleCollapsed = this.isStyleCollapsed; + tempData.trackPosition = this.trackPosition; + tempData.isVisible = this.isVisible; + this.trackData = tempData; + } + }, // Data binding observation point and trigger method _bindingPoint : { -- cgit v1.2.3 From a61713e5187e10cebf7984ced7a8443949c412b0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 10:56:47 -0700 Subject: fix a typo Signed-off-by: Valerio Virgillito --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 65476d6b..cb8185e5 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -221,7 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - }, + } }, // Set to false to skip array caching array sets in current document -- cgit v1.2.3 From 964484bc244dda21c6646f4c0d400d6c137ff442 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 11:04:46 -0700 Subject: fixing a default property Signed-off-by: Valerio Virgillito --- js/panels/css-panel/style-sheet.reel/style-sheet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.html b/js/panels/css-panel/style-sheet.reel/style-sheet.html index 7e27dd93..d08453fa 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.html +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.html @@ -27,7 +27,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "properties": { "element": {"#": "sheet-name"}, "identifier": "nameText", - "defaultText": "Style sheet" + "defaultValue": "Style sheet" }, "bindings": { "value": {"<-": "@owner.name"} -- cgit v1.2.3 From 55e392b4ac5e45e8bf468399b3c0ddde669a15fd Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 12 Jun 2012 11:10:38 -0700 Subject: montage v10 serialization updates for timeline Signed-off-by: Jonathan Duran --- js/panels/Timeline/Collapser.js | 34 ++++++++++++- js/panels/Timeline/Layer.reel/Layer.js | 13 +++++ .../Timeline/TimelineTrack.reel/TimelineTrack.html | 8 ++-- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 55 ++++++++++++++++++++-- 4 files changed, 101 insertions(+), 9 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js index 88314c8b..e5c04279 100644 --- a/js/panels/Timeline/Collapser.js +++ b/js/panels/Timeline/Collapser.js @@ -41,6 +41,7 @@ var Montage = require("montage/core/core").Montage, value: 0 }, contentHeight: { + serializable: true, get: function() { return this._contentHeight; }, @@ -59,6 +60,7 @@ var Montage = require("montage/core/core").Montage, value: false }, isAnimated: { + serializable: true, get: function() { return this._isAnimated; }, @@ -71,6 +73,7 @@ var Montage = require("montage/core/core").Montage, value: true }, bypassAnimation: { + serializable: true, get: function() { return this._bypassAnimation; }, @@ -102,6 +105,7 @@ var Montage = require("montage/core/core").Montage, value: "" }, isCollapsed : { + serializable: true, get: function() { return this._isCollapsed; }, @@ -110,7 +114,6 @@ var Montage = require("montage/core/core").Montage, this._isCollapsed = newVal; //this.needsDraw = true; } - } }, @@ -141,6 +144,7 @@ var Montage = require("montage/core/core").Montage, value: true }, isLabelClickable : { + serializable: true, get: function() { return this._isLabelClickable; }, @@ -149,6 +153,34 @@ var Montage = require("montage/core/core").Montage, } }, + _myContent:{ + value:null + }, + + myContent:{ + serializable:true, + get:function () { + return this._myContent; + }, + set:function (newVal) { + this._myContent = newVal; + } + }, + + _clicker:{ + value:null + }, + + clicker:{ + serializable:true, + get:function () { + return this._clicker; + }, + set:function (newVal) { + this._clicker = newVal; + } + }, + // isToggling: Bindable property. Set this (to anything) to trigger a toggle. _isToggling: { serializable: true, diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 6b64261e..a2d6444d 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -372,6 +372,19 @@ var Layer = exports.Layer = Montage.create(Component, { _layerEditable : { value: false }, + + _dynamicLayerName:{ + value:true + }, + dynamicLayerName:{ + serializable:true, + get:function () { + return this._dynamicLayerName; + }, + set:function (newVal) { + this._dynamicLayerName = newVal; + } + }, // Are the various collapsers collapsed or not _isMainCollapsed : { diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index 5c5a8b76..091470f3 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html @@ -16,10 +16,10 @@ "element": {"#": "track"}, "tweenRepetition" : {"@" : "tweenRepetition"}, "tween": {"@" : "tween"}, - "_mainCollapser" : {"@" : "mainCollapser"}, - "_positionCollapser" : {"@" : "positionCollapser"}, - "_transformCollapser" : {"@" : "transformCollapser"}, - "_styleCollapser" : {"@" : "styleCollapser"} + "mainCollapser" : {"@" : "mainCollapser"}, + "positionCollapser" : {"@" : "positionCollapser"}, + "transformCollapser" : {"@" : "transformCollapser"}, + "styleCollapser" : {"@" : "styleCollapser"} } }, diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 75997466..87a5e156 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/Tim