From 648ee61ae84216d0236e0dbc211addc13b2cfa3a Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:52:06 -0700 Subject: Expand tabs --- js/panels/CSSPanel/CSSPanel.js | 2 +- .../CSSPanel/CSSPanelBase.reel/CSSPanelBase.css | 114 +- .../CSSPanel/CSSPanelBase.reel/CSSPanelBase.html | 56 +- .../ComputedStyleSubPanel.html | 44 +- js/panels/Materials/MaterialsPanel.js | 4 +- .../materials-library-panel.html | 26 +- .../materials-library-panel.js | 18 +- .../materials-popup.reel/materials-popup.css | 4 +- .../materials-popup.reel/materials-popup.html | 20 +- .../materials-popup.reel/materials-popup.js | 842 ++--- js/panels/Panel.reel/Panel.html | 2 +- js/panels/Panel.reel/Panel.js | 2 +- js/panels/PanelContainer.reel/PanelContainer.html | 6 +- js/panels/Project/ProjectPanel.js | 14 +- .../projectpanelbase.reel/ProjectPanelBase.js | 3502 ++++++++++---------- .../projectpanelbase.reel/projectpanelbase.html | 158 +- js/panels/Resizer.js | 24 +- js/panels/Timeline/Collapser.js | 602 ++-- js/panels/Timeline/EasingMenu.reel/EasingMenu.html | 34 +- js/panels/Timeline/EasingMenu.reel/EasingMenu.js | 190 +- js/panels/Timeline/Keyframe.reel/Keyframe.html | 14 +- js/panels/Timeline/Keyframe.reel/Keyframe.js | 60 +- js/panels/Timeline/Layer.reel/Layer.html | 498 +-- js/panels/Timeline/Layer.reel/Layer.js | 1192 +++---- js/panels/Timeline/Layer.reel/scss/Layer.scss | 192 +- .../Timeline/PropertyTrack.reel/PropertyTrack.html | 28 +- .../Timeline/PropertyTrack.reel/PropertyTrack.js | 28 +- .../PropertyTrack.reel/scss/PropertyTrack.scss | 10 +- js/panels/Timeline/Span.reel/Span.html | 26 +- js/panels/Timeline/Span.reel/Span.js | 246 +- js/panels/Timeline/Span.reel/scss/Span.scss | 8 +- js/panels/Timeline/Style.reel/Style.html | 136 +- js/panels/Timeline/Style.reel/Style.js | 538 +-- js/panels/Timeline/Style.reel/scss/Style.scss | 64 +- .../Timeline/TimelinePanel.reel/TimelinePanel.html | 182 +- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 1986 +++++------ .../TimelinePanel.reel/scss/TimelinePanel.scss | 118 +- .../Timeline/TimelineTrack.reel/TimelineTrack.html | 280 +- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 632 ++-- .../TimelineTrack.reel/scss/TimelineTrack.scss | 14 +- js/panels/Timeline/Track.reel/Track.html | 40 +- js/panels/Timeline/Track.reel/Track.js | 2 +- .../Timeline/TrackSpacer.reel/TrackSpacer.html | 14 +- js/panels/Timeline/Tween.reel/Tween.html | 10 +- js/panels/Timeline/Tween.reel/Tween.js | 68 +- js/panels/binding-panel.reel/binding-panel.html | 10 +- js/panels/color/colorbutton-manager.js | 14 +- js/panels/color/colorpanel.js | 14 +- .../color/colorpanelbase.reel/colorpanelbase.html | 112 +- .../color/colorpanelbase.reel/colorpanelbase.js | 78 +- .../colorpanelbase.reel/css/colorpanelbase.scss | 338 +- .../colorpanelpopup.reel/colorpanelpopup.html | 98 +- .../color/colorpanelpopup.reel/colorpanelpopup.js | 716 ++-- .../colorpanelpopup.reel/css/colorpanelpopup.scss | 180 +- js/panels/color/colorpopup-manager.js | 1252 +++---- .../components-panel.reel/components-panel.html | 16 +- .../history-item.reel/history-item.html | 10 +- js/panels/history-panel/history.reel/history.html | 14 +- .../animations-presets.reel/animations-presets.js | 4 +- js/panels/presets/content.reel/content.html | 6 +- .../presets/style-presets.reel/style-presets.js | 2 +- .../transitions-presets.js | 4 +- js/panels/properties.reel/properties.css | 8 +- js/panels/properties.reel/properties.html | 6 +- js/panels/properties.reel/properties.js | 66 +- .../properties.reel/sections/custom.reel/custom.js | 28 +- 66 files changed, 7513 insertions(+), 7513 deletions(-) (limited to 'js/panels') diff --git a/js/panels/CSSPanel/CSSPanel.js b/js/panels/CSSPanel/CSSPanel.js index 0788b2c0..906da238 100755 --- a/js/panels/CSSPanel/CSSPanel.js +++ b/js/panels/CSSPanel/CSSPanel.js @@ -29,7 +29,7 @@ POSSIBILITY OF SUCH DAMAGE. */ var Montage = require("montage/core/core").Montage, - PanelBase = require("js/panels/PanelBase").PanelBase; + PanelBase = require("js/panels/PanelBase").PanelBase; var CSSPanelBase = require("js/panels/CSSPanel/CSSPanelBase.reel").CSSPanelBase; diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css index f70cb8cb..ba54723d 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css @@ -29,9 +29,9 @@ POSSIBILITY OF SUCH DAMAGE. */ .css_panel { - background-color: #FFF; - display: -webkit-box; - -webkit-box-orient: vertical; + background-color: #FFF; + display: -webkit-box; + -webkit-box-orient: vertical; height:100%; } .css_panel .resizer { @@ -40,18 +40,18 @@ POSSIBILITY OF SUCH DAMAGE. height: 1px; } .nj-section-header { - background-color: #333; - border-top: 1px solid #3D3D3D; - color: #FFF; - cursor: default; - font-size: 12px; - font-weight: normal; - height: 16px; - margin: 0; - padding: 4px 0 2px 10px; - vertical-align: top; - -webkit-box-flex: 0; - -webkit-user-select: none; + background-color: #333; + border-top: 1px solid #3D3D3D; + color: #FFF; + cursor: default; + font-size: 12px; + font-weight: normal; + height: 16px; + margin: 0; + padding: 4px 0 2px 10px; + vertical-align: top; + -webkit-box-flex: 0; + -webkit-user-select: none; } #nj-status-heading { color: #CCC; @@ -75,11 +75,11 @@ POSSIBILITY OF SUCH DAMAGE. -webkit-box-orient: vertical; } .nj-sub-panel { - color: #333; - padding: 0; - overflow: hidden; - opacity: 1; - -webkit-box-flex: 1; + color: #333; + padding: 0; + overflow: hidden; + opacity: 1; + -webkit-box-flex: 1; } .nj-sub-panel.closed { opacity: 0; @@ -92,9 +92,9 @@ POSSIBILITY OF SUCH DAMAGE. -webkit-transform: rotate(-90deg); } .nj-sub-panel ul { - list-style-type: none; - margin: 4px 0 5px; - padding: 0; + list-style-type: none; + margin: 4px 0 5px; + padding: 0; } /* ---------------------------------------- CSS Stylesheet List @@ -171,16 +171,16 @@ POSSIBILITY OF SUCH DAMAGE. -webkit-box-flex: 1; } .nj-css-rule-list li { - border-top: 1px solid #CCC; - padding: 6px; + border-top: 1px solid #CCC; + padding: 6px; } .nj-css-rule-list li:first-child { - padding-top: 0; - border-style: none; + padding-top: 0; + border-style: none; } .nj-css-rule-list li:after { - content: "}"; + content: "}"; } .nj-css-rule-list li.nj-css-rule-unapplied { background-color: #F4F4F4; @@ -202,8 +202,8 @@ POSSIBILITY OF SUCH DAMAGE. CSS Style List ---------------------------------------- */ .nj-css-style-list { - padding: 0; - margin: 0; + padding: 0; + margin: 0; } .nj-css-style-list > div { overflow: hidden; @@ -212,21 +212,21 @@ POSSIBILITY OF SUCH DAMAGE. white-space: nowrap; } .nj-css-style-list dt, .nj-css-style-list dd { - border: 1px solid rgba(0,0,0,0); + border: 1px solid rgba(0,0,0,0); border-radius: 2px; - margin: 0; - outline: none; - padding: 0 2px; + margin: 0; + outline: none; + padding: 0 2px; } .nj-css-style-list dt { - display: inline-block; - color: rgb(200,0,0); + display: inline-block; + color: rgb(200,0,0); max-width: 68%; overflow: hidden; text-overflow: ellipsis; } .nj-css-style-list dd { - display: inline; + display: inline; } /* ---------------------------------------- @@ -234,13 +234,13 @@ POSSIBILITY OF SUCH DAMAGE. ---------------------------------------- */ .nj-css-selector { display: inline-block; - font-weight: bold; - padding: 0 2px; - outline: none; + font-weight: bold; + padding: 0 2px; + outline: none; } .nj-css-selector:after { - content: " {"; - font-weight: normal; + content: " {"; + font-weight: normal; } .nj-css-selector.nj-editable-focus { position: relative; @@ -251,21 +251,21 @@ POSSIBILITY OF SUCH DAMAGE. #nj-section-styles dt:after { - color: #333; - content: ":"; + color: #333; + content: ":"; } #nj-section-styles dd:after { - content: ";"; + content: ";"; } .nj-sheet-link { - color: #333; - float: right; - margin-left: 15px; - position: relative; - top: -2px; + color: #333; + float: right; + margin-left: 15px; + position: relative; + top: -2px; } .nj-sheet-link:hover { - color: #666; + color: #666; } .nj-css-rule-list input[type="checkbox"], #nj-sheet-list input[type="checkbox"] { float: left; @@ -401,14 +401,14 @@ POSSIBILITY OF SUCH DAMAGE. } #nj-section-styles .nj-editable-focus { border: 1px solid #999; - box-shadow: 1px 1px 1px #CCC; + box-shadow: 1px 1px 1px #CCC; color: #333; display: inline-block; - margin-right: 7px; - /*margin-bottom: -1px;*/ - max-width: none; - overflow: visible; - -webkit-user-select: text; + margin-right: 7px; + /*margin-bottom: -1px;*/ + max-width: none; + overflow: visible; + -webkit-user-select: text; } .nj-css-rule-list .nj-editable-focus:after { position: relative; diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html index ed101f23..3c6c08ba 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html @@ -30,8 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. --> - - + + - + } + +
- -

-
- Stylesheets -

+ +

+
+ Stylesheets +

- + +
+
+ Add Rule
-
- Add Rule -
- -

-
- Styles - - 0 elements selected - -

-
+ +

+
+ Styles + + 0 elements selected + +

+
- + +
+
+ Computed + Add Rule
-
- Computed - Add Rule -
diff --git a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html index a65fd32f..3298ece5 100755 --- a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html +++ b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html @@ -30,9 +30,9 @@ POSSIBILITY OF SUCH DAMAGE. --> - - ComputedStyleSubPanel - + + ComputedStyleSubPanel + + } + -
-
- - -
-
-
-
-
+
+
+ + +
+
+
+
+
diff --git a/js/panels/Materials/MaterialsPanel.js b/js/panels/Materials/MaterialsPanel.js index 9d7f447a..4291f39b 100755 --- a/js/panels/Materials/MaterialsPanel.js +++ b/js/panels/Materials/MaterialsPanel.js @@ -29,8 +29,8 @@ POSSIBILITY OF SUCH DAMAGE. */ var Montage = require("montage/core/core").Montage, - PanelBase = require("js/panels/PanelBase").PanelBase, - MaterialsLibraryPanel = require("js/panels/Materials/materials-library-panel.reel").MaterialsLibraryPanel; + PanelBase = require("js/panels/PanelBase").PanelBase, + MaterialsLibraryPanel = require("js/panels/Materials/materials-library-panel.reel").MaterialsLibraryPanel; exports.MaterialsPanel = Montage.create(PanelBase, { id : {value : "materialsPanel", writable:true, enumerable:true, configurable:true}, diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html index f77d3186..3204ce50 100755 --- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.html @@ -29,16 +29,16 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> - - - + + + - - - + } + + + + -
+
@@ -125,7 +125,7 @@ POSSIBILITY OF SUCH DAMAGE.
-
+ 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 b5d6bb96..1cf3cec7 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 @@ -40,8 +40,8 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { }, _hasFocus: { - enumerable: false, - value: false + enumerable: false, + value: false }, didCreate: { @@ -98,10 +98,10 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { }, _showMaterialPopup: { - enumerable: false, - value: function (materialObj) { + enumerable: false, + value: function (materialObj) { - if(!this._materialPopup) + if(!this._materialPopup) { this._materialPopup = Popup.create(); this._materialPopup.content = this._materialInfo; @@ -113,15 +113,15 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { materialID = materialObj.materialId; this._materialInfo.loadMaterials(materialID, materialObj.useSelection, materialObj.whichMaterial); - } + } }, handleHideMaterialPopup: { - enumerable: false, - value: function (event) { + enumerable: false, + value: function (event) { if(this._materialPopup){ this._materialPopup.hide(); } - } + } } }); diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.css b/js/panels/Materials/materials-popup.reel/materials-popup.css index a5362615..3ddc8a98 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.css +++ b/js/panels/Materials/materials-popup.reel/materials-popup.css @@ -105,8 +105,8 @@ POSSIBILITY OF SUCH DAMAGE. .mp_properties_list > .mp_property > .colortoolbar { - width: 27px !important; - height: 27px !important; + width: 27px !important; + height: 27px !important; overflow:hidden !important; margin-top: -6px; } diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.html b/js/panels/Materials/materials-popup.reel/materials-popup.html index b377fa2d..eb2433e3 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.html +++ b/js/panels/Materials/materials-popup.reel/materials-popup.html @@ -29,13 +29,13 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> - + - + - + - - + - -
+ +
Material Name

-
Preview Pane
+
Preview Pane

@@ -125,6 +125,6 @@ POSSIBILITY OF SUCH DAMAGE.
-
- +
+ diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index 7c5493c6..cecb0a71 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js @@ -51,26 +51,26 @@ exports.MaterialsPopup = Montage.create(Component, { serializable: true }, - // Material Properties + // Material Properties _materialName: { enumerable: true, value: "" }, - _useSelection: { value: false, enumerable: true }, - _whichMaterial: { value: "fill", enumerable: true }, - _originalValues: {value: null, enumerable: true }, - - captureAction: { - value:function(event) { - switch(event._currentTarget.label) - { - case "Cancel": - console.log("Cancel material edit"); - this.revertToOriginalValues(); - break; - case "OK": - console.log("Committing material with the following values:"); + _useSelection: { value: false, enumerable: true }, + _whichMaterial: { value: "fill", enumerable: true }, + _originalValues: {value: null, enumerable: true }, + + captureAction: { + value:function(event) { + switch(event._currentTarget.label) + { + case "Cancel": + console.log("Cancel material edit"); + this.revertToOriginalValues(); + break; + case "OK": + console.log("Committing material with the following values:"); for(var i=0, len=this.materialsProperties.childComponents.length; i< len; i++) { var childControl = this.materialsProperties.childComponents[i]; @@ -88,53 +88,53 @@ exports.MaterialsPopup = Montage.create(Component, { console.log("--------------"); } - break; - } + break; + } // Notify Materials Library to close popup NJevent("hideMaterialPopup"); - } - }, - - revertToOriginalValues: - { - value: function() - { - if (this._originalValues) - { - this._material.importJSON( this._originalValues ); - - if (this._useSelection) - { - var selection = this.application.ninja.selectedElements; - if (selection && (selection.length > 0)) - { - var nObjs = selection.length; - for (var iObj=0; iObj 0)) + { + var nObjs = selection.length; + for (var iObj=0; iObj 0)) - { - var nObjs = selection.length; - for (var iObj=0; iObj 0)) - { - var index = value.lastIndexOf( "/" ); - if (index < 0) index = value.lastIndexOf( "\\" ); - if (index >= 0) - { - value = value.substr( index+1 ); - value = "assets/images/" + value; - } - rtnValue = value.slice(0); - } - break; - - case "checkbox": - rtnValue = value; - break; - - default: - console.log( "unrecognized material control type: " + type ); - break; - } - return rtnValue; - } - }, + applyProperty: + { + value: function( propLabel, propValue) + { + // find the property lable in the array + // This assumes no duplication in labels + if (this._propLabels) + { + // the label cones through with a trailing ':'. remove that + var ch = propLabel[ propLabel.length - 1]; + if (ch == ':') + propLabel = propLabel.substr(0, propLabel.length - 1); + + var index; + var nProps = this._propLabels.length; + for (var i=0; i 0)) + { + var nObjs = selection.length; + for (var iObj=0; iObj 0)) + { + var index = value.lastIndexOf( "/" ); + if (index < 0) index = value.lastIndexOf( "\\" ); + if (index >= 0) + { + value = value.substr( index+1 ); + value = "assets/images/" + value; + } + rtnValue = value.slice(0); + } + break; + + case "checkbox": + rtnValue = value; + break; + + default: + console.log( "unrecognized material control type: " + type ); + break; + } + return rtnValue; + } + }, //////////////////////////////////////////////////////////////////// - // - prepareForDraw: { - enumerable: false, - value: function() { + // + prepareForDraw: { + enumerable: false, + value: function() { this.cancelButton.addEventListener("action", this, true); this.okButton.addEventListener("action", this, true); } }, - //////////////////////////////////////////////////////////////////// - // - didDraw: { - enumerable: false, - value: function() { + //////////////////////////////////////////////////////////////////// + // + didDraw: { + enumerable: false, + value: function() { this.materialTitle.innerHTML = this._materialName; - } - }, - - //Garbage collection (Manual method) - destroy: { - enumerable: false, - value: function() { - // add cleanup routines here - } - }, - - loadMaterials: - { - enumerable: true, - 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 (useSelection) - { - this._useSelection = true; - var selection = this.application.ninja.selectedElements; - if (selection && (selection.length > 0)) - { - 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(); - } - } - else - { - this._useSelection = false; - - if( - (materialID === "Bump Metal") || - (materialID === "Deform") || - (materialID === "Flat") || - (materialID === "Flag") || - (materialID === "Fly") || - (materialID === "Julia") || - (materialID === "Keleidoscope") || - (materialID === "Linear Gradient") || - (materialID === "Mandel") || - (materialID === "Paris") || - (materialID === "Plasma") || - (materialID === "Pulse") || - (materialID === "Radial Blur") || - (materialID === "Radial Gradient") || - (materialID === "Raiders") || - (materialID === "Relief Tunnel") || - (materialID === "Square Tunnel") || - (materialID === "Star") || - (materialID === "Taper") || - (materialID === "Tunnel") || - (materialID === "Twist") || - (materialID === "Twist Vertex") || - (materialID === "Uber") || - (materialID === "Water") || - (materialID === "Z-Invert") - ) - { - material = MaterialsModel.getMaterial( materialID ); - } - } - - if (material) - { - this._material = material; - this._originalValues = material.exportJSON(); - this.materialsData = this.getMaterialData( material ); - } - else - { - this.materialsData = this[materialID]; - } - this.needsDraw = true; - } - }, - - getMaterialData: - { - value: function( material ) - { - // declare the array to hold the results - var rtnArray = []; - - var propNames = [], propValues = [], propTypes = [], propLabels = []; - this._propNames = propNames; - this._propValues = propValues; - this._propTypes = propTypes; - this._propLabels = propLabels; - material.getAllProperties( propNames, propValues, propTypes, propLabels); - var n = propNames.length; - for (var i=0; i 0)) + { + 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(); + } + } + else + { + this._useSelection = false; + + if( + (materialID === "Bump Metal") || + (materialID === "Deform") || + (materialID === "Flat") || + (materialID === "Flag") || + (materialID === "Fly") || + (materialID === "Julia") || + (materialID === "Keleidoscope") || + (materialID === "Linear Gradient") || + (materialID === "Mandel") || + (materialID === "Paris") || + (materialID === "Plasma") || + (materialID === "Pulse") || + (materialID === "Radial Blur") || + (materialID === "Radial Gradient") || + (materialID === "Raiders") || + (materialID === "Relief Tunnel") || + (materialID === "Square Tunnel") || + (materialID === "Star") || + (materialID === "Taper") || + (materialID === "Tunnel") || + (materialID === "Twist") || + (materialID === "Twist Vertex") || + (materialID === "Uber") || + (materialID === "Water") || + (materialID === "Z-Invert") + ) + { + material = MaterialsModel.getMaterial( materialID ); + } + } + + if (material) + { + this._material = material; + this._originalValues = material.exportJSON(); + this.materialsData = this.getMaterialData( material ); + } + else + { + this.materialsData = this[materialID]; + } + this.needsDraw = true; + } + }, + + getMaterialData: + { + value: function( material ) + { + // declare the array to hold the results + var rtnArray = []; + + var propNames = [], propValues = [], propTypes = [], propLabels = []; + this._propNames = propNames; + this._propValues = propValues; + this._propTypes = propTypes; + this._propLabels = propLabels; + material.getAllProperties( propNames, propValues, propTypes, propLabels); + var n = propNames.length; + for (var i=0; i 2) - { - obj["defaults"]["data"][2] = - { - "label": "Z", - "description": "Z value", - "controlType": "HotText", - "defaults": - { - "minValue": -1.e8, - "maxValue": 1.e8, - "value": value[2] - } - } - } - - return obj; - } - }, + } + + if (dimen > 2) + { + obj["defaults"]["data"][2] = + { + "label": "Z", + "description": "Z value", + "controlType": "HotText", + "defaults": + { + "minValue": -1.e8, + "maxValue": 1.e8, + "value": value[2] + } + } + } + + return obj; + } + }, // _dummyData1 CheckerBoard: { @@ -800,11 +800,11 @@ exports.MaterialsPopup = Montage.create(Component, { }, _materialsData: { - enumerable: true, + enumerable: true, serializable: true, - value: [] + value: [] - }, + }, materialsData: { enumerable: true, diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html index c6c4f4b3..f7eea93e 100755 --- a/js/panels/Panel.reel/Panel.html +++ b/js/panels/Panel.reel/Panel.html @@ -157,7 +157,7 @@ POSSIBILITY OF SUCH DAMAGE. } - +
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 6de011ed..921292e6 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -37,7 +37,7 @@ exports.Panel = Montage.create(Component, { value: "Panel" }, - groups: { + groups: { value: [] }, diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html index c84315d3..32ed45e8 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html @@ -149,10 +149,10 @@ POSSIBILITY OF SUCH DAMAGE. } - +
-
+
@@ -161,7 +161,7 @@ POSSIBILITY OF SUCH DAMAGE.
-
+
diff --git a/js/panels/Project/ProjectPanel.js b/js/panels/Project/ProjectPanel.js index 5dcba3e7..1d6a8e5c 100755 --- a/js/panels/Project/ProjectPanel.js +++ b/js/panels/Project/ProjectPanel.js @@ -29,12 +29,12 @@ POSSIBILITY OF SUCH DAMAGE. */ var Montage = require("montage/core/core").Montage, - PanelBase = require("js/panels/PanelBase").PanelBase, - ProjectPanelBase = require("js/panels/Project/ProjectPanelBase.reel").ProjectPanelBase; + PanelBase = require("js/panels/PanelBase").PanelBase, + ProjectPanelBase = require("js/panels/Project/ProjectPanelBase.reel").ProjectPanelBase; exports.ProjectPanel = Montage.create(PanelBase, { - id: {value: "projectPanel", writable: true, enumerable: true, configurable: true}, + id: {value: "projectPanel", writable: true, enumerable: true, configurable: true}, panelName: {value: "Project/Assets", writable: true, enumerable: true, configurable: true}, panelHeaderID: {value: "projectPanelHeader", writable: true, enumerable: true, configurable: true}, disclosureIconID: {value: "projectPanelDisclosureIcon", writable: true, enumerable: true, configurable: true}, @@ -42,9 +42,9 @@ exports.ProjectPanel = Montage.create(PanelBase, { panelContentID: {value: "projectPanelContent", writable: true, enumerable: true, configurable: true}, init: { - enumerable: true, - value: function() { - //Creating panel container and panel + enumerable: true, + value: function() { + //Creating panel container and panel this.minHeight = 350; this.defaultHeight = 350; this.contentHeight = 395; @@ -57,7 +57,7 @@ exports.ProjectPanel = Montage.create(PanelBase, { this._projectPanelBase.element = ppContainer; //Adding container to the parent this.content = this._projectPanelBase; - //Drawing panel + //Drawing panel this._projectPanelBase.needsDraw = true; */ diff --git a/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js b/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js index 51aebc31..759c5861 100755 --- a/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js +++ b/js/panels/Project/projectpanelbase.reel/ProjectPanelBase.js @@ -29,1868 +29,1868 @@ POSSIBILITY OF SUCH DAMAGE. */ var TreeControl = require("js/components/tree.reel").Tree, - ResizerControl = require("js/panels/Resizer").Resizer, - nj = require("js/lib/NJUtils").NJUtils; + ResizerControl = require("js/panels/Resizer").Resizer, + nj = require("js/lib/NJUtils").NJUtils; exports.ProjectPanelBase = (require("montage/core/core").Montage).create(require("montage/ui/component").Component, { - hasTemplate: { - value: true - }, + hasTemplate: { + value: true + }, _hasFocus: { - numerable: false, - value: false + numerable: false, + value: false }, /* The current project that we have in memory */ - _activeProject: { - value: false - }, - activeProject: { - get: function() { - return this._activeProject; - }, - set: function(objNewProject) { - this._activeProject = objNewProject; - } - }, + _activeProject: { + value: false + }, + activeProject: { + get: function() { + return this._activeProject; + }, + set: function(objNewProject) { + this._activeProject = objNewProject; + } + }, /* Is the panel initialized? Helps keep us from re-initializing things when a project switches */ _isPanelInitialized: { - value: false + value: false }, isPanelInitialized: { - get: function() { - return this._isPanelInitialized; - }, - set: function(boolValue) { - this._isPanelInitialized = boolValue; - } + get: function() { + return this._isPanelInitialized; + }, + set: function(boolValue) { + this._isPanelInitialized = boolValue; + } }, /* Project models: is there an active project, did the user just swap the project, etc. */ - _swapProject: { - value: false - }, - swapProject: { - get: function() { - return this._swapProject; - }, - set: function(boolValue) { - this._swapProject = boolValue; - } - }, - _updateTree: { - value: false - }, - updateTree: { - get: function() { - return this._updateTree; - }, - set: function(boolValue) { - this._updateTree = boolValue; - } - }, - _updateAssets: { - value: false - }, - _updateAssets : { - get: function() { - return this._updateAssets; - }, - set: function(boolValue) { - this._updateAssets = boolValue; - } - }, - _hasActiveProject: { - value: false - }, - hasActiveProject: { - get: function() { - return this._hasActiveProject; - }, - set: function(boolValue) { - if (this.hasActiveProject !== boolValue) { - this._hasActiveProject = boolValue; - this.needsDraw = true; - this.swapProject = true; - this.loadPanelState(); - } - } - }, - setActiveProject: { - value: function(myVal) { - this.hasActiveProject = myVal; - } - }, - - /* Focus monitor: needed to modify keyboard navigation through panels. */ - _hasFocus: { - value: false - }, - hasFocus: { - get: function() { - return this._hasFocus; - }, - set: function(newVal) { - if (this._hasFocus !== newVal) { - this._hasFocus = newVal; - } - } - }, + _swapProject: { + value: false + }, + swapProject: { + get: function() { + return this._swapProject; + }, + set: function(boolValue) { + this._swapProject = boolValue; + } + }, + _updateTree: { + value: false + }, + updateTree: { + get: function() { + return this._updateTree; + }, + set: function(boolValue) { + this._updateTree = boolValue; + } + }, + _updateAssets: { + value: false + }, + _updateAssets : { + get: function() { + return this._updateAssets; + }, + set: function(boolValue) { + this._updateAssets = boolValue; + } + }, + _hasActiveProject: { + value: false + }, + hasActiveProject: { + get: function() { + return this._hasActiveProject; + }, + set: function(boolValue) { + if (this.hasActiveProject !== boolValue) { + this._hasActiveProject = boolValue; + this.needsDraw = true; + this.swapProject = true; + this.loadPanelState(); + } + } + }, + setActiveProject: { + value: function(myVal) { + this.hasActiveProject = myVal; + } + }, + + /* Focus monitor: needed to modify keyboard navigation through panels. */ + _hasFocus: { + value: false + }, + hasFocus: { + get: function() { + return this._hasFocus; + }, + set: function(newVal) { + if (this._hasFocus !== newVal) { + this._hasFocus = newVal; + } + } + }, /* Active column models: Used to store the state of the columns as a resize is happening */ _activeColumn: { - enumerable: false, - value: false + enumerable: false, + value: false }, activeColumn: { - get: function() { - return this._activeColumn; - }, - set: function(intActiveColumn) { - this._activeColumn = intActiveColumn; - } + get: function() { + return this._activeColumn; + }, + set: function(intActiveColumn) { + this._activeColumn = intActiveColumn; + } }, _activeColumnWidths: { - enumerable: false, - value: [0,0,0] + enumerable: false, + value: [0,0,0] }, activeColumnWidths: { - get: function() { - return this._activeColumnWidths; - }, - set: function(activeColumnWidths) { - for (var i = 0; i < activeColumnWidths.length; i++) { - if (this._activeColumnWidths[i] !== activeColumnWidths[i]) { - this._activeColumnWidths[i] = activeColumnWidths[i]; - this.activeColumn = i; - this.needsDraw = true; - } - } - } + get: function() { + return this._activeColumnWidths; + }, + set: function(activeColumnWidths) { + for (var i = 0; i < activeColumnWidths.length; i++) { + if (this._activeColumnWidths[i] !== activeColumnWidths[i]) { + this._activeColumnWidths[i] = activeColumnWidths[i]; + this.activeColumn = i; + this.needsDraw = true; + } + } + } }, /* resizeColumn: Method to resize a column */ resizeColumn: { - value: function(strSelectorBase) { - // Resize column with index this.activeColumn in view specified by strSelectorBase. - var intAdjust = 0, - intTotalWidth = 0, - arrToChange = [], - arrToChangeLength = 0, - arrHeaders = document.querySelectorAll(strSelectorBase + " .pp-header"); - arrHeadersLength = arrHeaders.length; - containerList = document.querySelectorAll(strSelectorBase + " .pp-scroll-linked"); - containerListLength = containerList.length, - intNewWidth = 0, - strNewWidth = "", - boolProjectView = true, - arrStoredWidths = this.panelState.projectColumnWidths; - - if (strSelectorBase.indexOf("assets") > -1) { - boolProjectView = false; - arrStoredWidths = this.panelState.assetColumnWidths; - } + value: function(strSelectorBase) { + // Resize column with index this.activeColumn in view specified by strSelectorBase. + var intAdjust = 0, + intTotalWidth = 0, + arrToChange = [], + arrToChangeLength = 0, + arrHeaders = document.querySelectorAll(strSelectorBase + " .pp-header"); + arrHeadersLength = arrHeaders.length; + containerList = document.querySelectorAll(strSelectorBase + " .pp-scroll-linked"); + containerListLength = containerList.length, + intNewWidth = 0, + strNewWidth = "", + boolProje