From 5a1965bf2ed9a54601ca16fd67555335c510ce08 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 26 Apr 2012 16:40:05 -0700 Subject: Update materials to the new texture model. Create local world for deleted source canvases --- js/panels/Materials/materials-data.json | 84 ++++++++++++++++++++-- .../materials-popup.reel/materials-popup.js | 56 ++++++++++----- 2 files changed, 116 insertions(+), 24 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-data.json b/js/panels/Materials/materials-data.json index f06ab6c8..5e86793e 100644 --- a/js/panels/Materials/materials-data.json +++ b/js/panels/Materials/materials-data.json @@ -4,25 +4,97 @@ { "label": "Ninja Materials", "children": [ - { - "label": "Uber", - "id" : "UberMaterial" - }, { "label": "Bump Metal", "id" : "BumpMetalMaterial" }, + { + "label": "Deform", + "id" : "DeformMaterial" + }, + { + "label": "Flat", + "id" : "FlatMaterial" + }, + { + "label": "Flag", + "id" : "FlagMaterial" + }, + { + "label": "Fly", + "id" : "FlyMaterial" + }, + { + "label": "Julia", + "id" : "JuliaMaterial" + }, + { + "label": "Keleidoscope", + "id" : "KeleidoscopeMaterial" + }, { "label": "Linear Gradient", "id" : "LinearGradientMaterial" }, + { + "label": "Mandel", + "id" : "MandelMaterial" + }, + { + "label": "Plasma", + "id" : "PlasmaMaterial" + }, + { + "label": "Pulse", + "id" : "PulseMaterial" + }, + { + "label": "Radial Blur", + "id" : "RadialBlurMaterial" + }, { "label": "Radial Gradient", "id" : "RadialGradientMaterial" }, { - "label": "Flat", - "id" : "FlatMaterial" + "label": "Relief Tunnel", + "id" : "ReliefTunnelMaterial" + }, + { + "label": "Square Tunnel", + "id" : "SquareTunnelMaterial" + }, + { + "label": "Star", + "id" : "StarMaterial" + }, + { + "label": "Taper", + "id" : "TaperMaterial" + }, + { + "label": "Tunnel", + "id" : "TunnelMaterial" + }, + { + "label": "Twist", + "id" : "TwistMaterial" + }, + { + "label": "Twist Vertex", + "id" : "TwistVertMaterial" + }, + { + "label": "Uber", + "id" : "UberMaterial" + }, + { + "label": "Water", + "id" : "WaterMaterial" + }, + { + "label": "Z-Invert", + "id" : "ZInvertMaterial" } ] }, diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index bd10f7a5..9220659e 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -164,8 +164,10 @@ exports.MaterialsPopup = Montage.create(Component, { var index = value.lastIndexOf( "/" ); if (index < 0) index = value.lastIndexOf( "\\" ); if (index >= 0) + { value = value.substr( index+1 ); - value = "assets\\images\\" + value; + value = "assets\\images\\" + value; + } rtnValue = value.slice(0); } break; @@ -214,30 +216,48 @@ exports.MaterialsPopup = Montage.create(Component, { enumerable: true, value: function(materialID) { - //TODO - Hack to force repetition to draw. Setting .length = 0 did not work. - this.materialsData = []; - - this._materialName = materialID; - if( - (materialID === "UberMaterial") || - (materialID === "FlatMaterial") || - (materialID === "BumpMetalMaterial") || - (materialID === "LinearGradientMaterial") || - (materialID === "RadialGradientMaterial") + //TODO - Hack to force repetition to draw. Setting .length = 0 did not work. + this.materialsData = []; + + this._materialName = materialID; + if( + (materialID === "BumpMetalMaterial") || + (materialID === "DeformMaterial") || + (materialID === "FlatMaterial") || + (materialID === "FlagMaterial") || + (materialID === "FlyMaterial") || + (materialID === "JuliaMaterial") || + (materialID === "KeleidoscopeMaterial") || + (materialID === "LinearGradientMaterial") || + (materialID === "MandelMaterial") || + (materialID === "PlasmaMaterial") || + (materialID === "PulseMaterial") || + (materialID === "RadialBlurMaterial") || + (materialID === "RadialGradientMaterial") || + (materialID === "ReliefTunnelMaterial") || + (materialID === "SquareTunnelMaterial") || + (materialID === "StarMaterial") || + (materialID === "TaperMaterial") || + (materialID === "TunnelMaterial") || + (materialID === "TwistMaterial") || + (materialID === "TwistVertMaterial") || + (materialID === "UberMaterial") || + (materialID === "WaterMaterial") || + (materialID === "ZInvertMaterial") ) { var material = MaterialsModel.getMaterial( materialID ); if (material) { this._material = material; - this.materialsData = this.getMaterialData( material ); + this.materialsData = this.getMaterialData( material ); } - } - else - { - this.materialsData = this[materialID]; - } - this.needsDraw = true; + } + else + { + this.materialsData = this[materialID]; + } + this.needsDraw = true; } }, -- cgit v1.2.3 From 8eac5582b72115969a9f915f4303535c22018033 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 2 May 2012 17:00:12 -0700 Subject: Material editor --- .../materials-library-panel.js | 13 ++-- .../materials-popup.reel/materials-popup.js | 80 +++++++++++++--------- 2 files changed, 57 insertions(+), 36 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..205ecd90 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 @@ -51,14 +51,15 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { handleNodeActivation: { value:function(obj) { - this._showMaterialPopup(obj.id); + this._showMaterialPopup({ materialId: obj.id }); } }, handleShowMaterialPopup: { enumerable: false, value: function (event) { - this._showMaterialPopup(event.detail.materialId); + //this._showMaterialPopup(event.detail.materialId); + this._showMaterialPopup(event.detail); } }, @@ -73,9 +74,9 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { _showMaterialPopup: { enumerable: false, - value: function (materialID) { + value: function (materialObj) { - if(!this._materialPopup) + if(!this._materialPopup) { this._materialPopup = Popup.create(); this._materialPopup.content = this._materialInfo; @@ -84,7 +85,9 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { this._materialPopup.addEventListener("show", this, false); } this._materialPopup.show(); - this._materialInfo.loadMaterials(materialID); + + materialID = materialObj.materialId; + this._materialInfo.loadMaterials(materialID, materialObj.useSelection, materialObj.whichMaterial); } }, diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index 9220659e..5a711455 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -88,8 +88,9 @@ exports.MaterialsPopup = Montage.create(Component, { _handlePropertyChange: { - value: function(event) + value: function(theEvent) { + var event = theEvent._event; if(typeof event.propertyValue === "object") { console.log(event.propertyLabel + " changed to "); @@ -214,46 +215,63 @@ exports.MaterialsPopup = Montage.create(Component, { loadMaterials: { enumerable: true, - value: function(materialID) + value: function(materialID, useSelection, whichMaterial) { //TODO - Hack to force repetition to draw. Setting .length = 0 did not work. this.materialsData = []; + var material; this._materialName = materialID; - if( - (materialID === "BumpMetalMaterial") || - (materialID === "DeformMaterial") || - (materialID === "FlatMaterial") || - (materialID === "FlagMaterial") || - (materialID === "FlyMaterial") || - (materialID === "JuliaMaterial") || - (materialID === "KeleidoscopeMaterial") || - (materialID === "LinearGradientMaterial") || - (materialID === "MandelMaterial") || - (materialID === "PlasmaMaterial") || - (materialID === "PulseMaterial") || - (materialID === "RadialBlurMaterial") || - (materialID === "RadialGradientMaterial") || - (materialID === "ReliefTunnelMaterial") || - (materialID === "SquareTunnelMaterial") || - (materialID === "StarMaterial") || - (materialID === "TaperMaterial") || - (materialID === "TunnelMaterial") || - (materialID === "TwistMaterial") || - (materialID === "TwistVertMaterial") || - (materialID === "UberMaterial") || - (materialID === "WaterMaterial") || - (materialID === "ZInvertMaterial") - ) + if (useSelection) { - var material = MaterialsModel.getMaterial( materialID ); - if (material) + var selection = this.application.ninja.selectedElements; + if (selection && (selection.length > 0)) { - this._material = material; - this.materialsData = this.getMaterialData( material ); + var canvas = selection[0]; + var obj; + if (canvas.elementModel && canvas.elementModel.shapeModel) obj = canvas.elementModel.shapeModel.GLGeomObj; + if (obj) + material = (whichMaterial === 'stroke') ? obj.getStrokeMaterial() : obj.getFillMaterial(); } } else + { + if( + (materialID === "BumpMetalMaterial") || + (materialID === "DeformMaterial") || + (materialID === "FlatMaterial") || + (materialID === "FlagMaterial") || + (materialID === "FlyMaterial") || + (materialID === "JuliaMaterial") || + (materialID === "KeleidoscopeMaterial") || + (materialID === "LinearGradientMaterial") || + (materialID === "MandelMaterial") || + (materialID === "PlasmaMaterial") || + (materialID === "PulseMaterial") || + (materialID === "RadialBlurMaterial") || + (materialID === "RadialGradientMaterial") || + (materialID === "ReliefTunnelMaterial") || + (materialID === "SquareTunnelMaterial") || + (materialID === "StarMaterial") || + (materialID === "TaperMaterial") || + (materialID === "TunnelMaterial") || + (materialID === "TwistMaterial") || + (materialID === "TwistVertMaterial") || + (materialID === "UberMaterial") || + (materialID === "WaterMaterial") || + (materialID === "ZInvertMaterial") + ) + { + material = MaterialsModel.getMaterial( materialID ); + } + } + + if (material) + { + this._material = material; + this.materialsData = this.getMaterialData( material ); + } + else { this.materialsData = this[materialID]; } -- cgit v1.2.3 From 1e649405d66f17d6acddb9055b181bba7ad70566 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 16 May 2012 13:41:48 -0700 Subject: Exposing parameters in Water Material --- js/panels/Materials/materials-popup.reel/materials-popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index 5a711455..c54b311e 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -371,7 +371,7 @@ exports.MaterialsPopup = Montage.create(Component, { "defaults": { "minValue": 0, - "maxValue": 128, + "maxValue": 400, "decimalPlace": 100, "value": value } -- cgit v1.2.3 From cc3b66f817c9d72ca247d5ff789a08ec5b57a2b5 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 22 May 2012 08:38:38 -0700 Subject: Editable material properties --- js/panels/Materials/materials-popup.reel/materials-popup.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index c54b311e..1e92e144 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -18,6 +18,8 @@ exports.MaterialsPopup = Montage.create(Component, { value: "" }, + _useSelection: { value: false, enumerable: true }, + captureAction: { value:function(event) { switch(event._currentTarget.label) @@ -134,6 +136,11 @@ exports.MaterialsPopup = Montage.create(Component, { var value = this.decodeValue( this._propTypes[index], propValue ); this._material.setProperty( this._propNames[index], value ); } + + if (this._useSelection) + { + console.log( "apply to selection" ); + } } } }, @@ -224,6 +231,7 @@ exports.MaterialsPopup = Montage.create(Component, { this._materialName = materialID; if (useSelection) { + this._useSelection = true; var selection = this.application.ninja.selectedElements; if (selection && (selection.length > 0)) { @@ -236,6 +244,8 @@ exports.MaterialsPopup = Montage.create(Component, { } else { + this._useSelection = false; + if( (materialID === "BumpMetalMaterial") || (materialID === "DeformMaterial") || @@ -342,7 +352,7 @@ exports.MaterialsPopup = Montage.create(Component, { { value: function( label, color ) { - var css = 'rgba(' + color[0]*255 + ',' + color[1]*255 + ',' + color[2]*255 + ',' + color[3] + ')'; + var css = 'rgba(' + Math.floor(color[0]*255) + ',' + Math.floor(color[1]*255) + ',' + Math.floor(color[2]*255) + ',' + color[3] + ')'; var colorObj = this.application.ninja.colorController.getColorObjFromCss(css) var obj = { -- cgit v1.2.3 From 725c2175f20b5e0829518f725fd26cc077748bdf Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 25 May 2012 13:35:10 -0700 Subject: Parameters for twistVertex material --- js/panels/Materials/materials-popup.reel/materials-popup.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index 1e92e144..1237e602 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -166,6 +166,10 @@ exports.MaterialsPopup = Montage.create(Component, { rtnValue = value; break; + case "angle": + rtnValue = value*3.14159/180.0; + break; + case "file": if (value && (value.length > 0)) { @@ -324,6 +328,10 @@ exports.MaterialsPopup = Montage.create(Component, { obj = this.createFloatData( propLabels[i], propValues[i] ); break; + case "angle": + obj = this.createFloatData( propLabels[i], propValues[i]*180.0/3.14159 ); + break; + case "file": obj = this.createFileData( propLabels[i], propValues[i] ); break; -- cgit v1.2.3 From 7afe0ddcae8f2f0899bffd16ba171c927b3fca96 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 1 Jun 2012 14:09:05 -0700 Subject: Correction for texture paths. --- js/panels/Materials/materials-popup.reel/materials-popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index db3f7652..3ef2e4ef 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -178,7 +178,7 @@ exports.MaterialsPopup = Montage.create(Component, { if (index >= 0) { value = value.substr( index+1 ); - value = "assets\\images\\" + value; + value = "assets/images/" + value; } rtnValue = value.slice(0); } -- cgit v1.2.3 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 6c994c4b90023cecf4fd0caafb404b859fe28f54 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 6 Jun 2012 16:34:41 -0700 Subject: material cleanup and rearchitecture --- .../Materials/materials-popup.reel/materials-popup.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'js/panels') diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index 3ef2e4ef..5b9790b8 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -19,6 +19,7 @@ exports.MaterialsPopup = Montage.create(Component, { }, _useSelection: { value: false, enumerable: true }, + _whichMaterial: { value: "fill", enumerable: true }, captureAction: { value:function(event) { @@ -140,6 +141,20 @@ exports.MaterialsPopup = Montage.create(Component, { if (this._useSelection) { console.log( "apply to selection" ); + + var selection = this.application.ninja.selectedElements; + if (selection && (selection.length > 0)) + { + var canvas = selection[0]; + var obj; + if (canvas.elementModel && canvas.elementModel.shapeModel) obj = canvas.elementModel.shapeModel.GLGeomObj; + if (obj) + { + var world = obj.getWorld(); + if (world) + world.restartRenderLoop(); + } + } } } } @@ -241,6 +256,7 @@ exports.MaterialsPopup = Montage.create(Component, { { var canvas = selection[0]; var obj; + this._whichMaterial = whichMaterial; if (canvas.elementModel && canvas.elementModel.shapeModel) obj = canvas.elementModel.shapeModel.GLGeomObj; if (obj) material = (whichMaterial === 'stroke') ? obj.getStrokeMaterial() : obj.getFillMaterial(); -- 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