diff options
author | Nivesh Rajbhandari | 2012-04-25 13:34:04 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-25 13:34:04 -0700 |
commit | 32a24988add5ba0ecf80caa31871cdd90e3eea5b (patch) | |
tree | fbf05f2dfc91e57ab9598046ff16798ea0ae1966 /js/panels/properties.reel | |
parent | 60d6346a78fb5257eaf36f17a5fcb764a342c012 (diff) | |
parent | d3a6350163ada5644d34ed8d5c2a00cef4db2afc (diff) | |
download | ninja-32a24988add5ba0ecf80caa31871cdd90e3eea5b.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-x | js/panels/properties.reel/properties.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 625e3eb6..b21014c1 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -73,8 +73,9 @@ exports.Properties = Montage.create(Component, { | |||
73 | 73 | ||
74 | this.eventManager.addEventListener( "elementChange", this, false); | 74 | this.eventManager.addEventListener( "elementChange", this, false); |
75 | 75 | ||
76 | // For now always assume that the stage is selected by default | 76 | // For now always assume that the stage is selected by default when opening the old template |
77 | if(this.application.ninja.selectedElements.length === 0) { | 77 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK |
78 | if(this.application.ninja.selectedElements.length === 0 && this.application.ninja.currentDocument.documentRoot.nodeName.toLowerCase() !== "body") { | ||
78 | this.displayStageProperties(); | 79 | this.displayStageProperties(); |
79 | } | 80 | } |
80 | } | 81 | } |
@@ -113,13 +114,14 @@ exports.Properties = Montage.create(Component, { | |||
113 | } | 114 | } |
114 | 115 | ||
115 | if(this.application.ninja.selectedElements.length) { | 116 | if(this.application.ninja.selectedElements.length) { |
116 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); | 117 | // ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); |
118 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, this.application.ninja.selectedElements[0].id, "pi"); | ||
117 | } else { | 119 | } else { |
118 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); | 120 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); |
119 | } | 121 | } |
120 | } else if(event.target.id === "elementClass") { | 122 | } else if(event.target.id === "elementClass") { |
121 | if(this.application.ninja.selectedElements.length) { | 123 | if(this.application.ninja.selectedElements.length) { |
122 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); | 124 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); |
123 | } else { | 125 | } else { |
124 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); | 126 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); |
125 | } | 127 | } |