aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel/Layer.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-07-18 11:42:46 -0700
committerJose Antonio Marquez2012-07-18 11:42:46 -0700
commit00d11977825e56a1306f2ed13125b94cae369854 (patch)
tree4c5c6b03810ed5099a641d43939e39f28ba7797c /js/panels/Timeline/Layer.reel/Layer.js
parenta8ca472ec3a1d1510000fd83d6904cbd0e9981b5 (diff)
parentecc2f1c6296ac5e706b1d6388254c8df24a01066 (diff)
downloadninja-00d11977825e56a1306f2ed13125b94cae369854.tar.gz
Merge branch 'refs/heads/Ninja-Master' into Tracking
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js29
1 files changed, 7 insertions, 22 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 23ea200f..f303fd79 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -1072,105 +1072,89 @@ var Layer = exports.Layer = Montage.create(Component, {
1072 handleLeftChange: { 1072 handleLeftChange: {
1073 value: function(event) { 1073 value: function(event) {
1074 var prevPosition; 1074 var prevPosition;
1075 if(this.application.ninja.timeline.selectedStyle==="left" ||this.application.ninja.timeline.selectedStyle==="master" ){ 1075
1076 if(!event.wasSetByCode) { 1076 if(!event.wasSetByCode) {
1077 if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; 1077 if(this.savedPosition) prevPosition = [this.savedPosition + "px"];
1078 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Change", "timeline", prevPosition); 1078 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Change", "timeline", prevPosition);
1079 this.savedPosition = null; 1079 this.savedPosition = null;
1080 } 1080 }
1081 1081
1082 } 1082
1083 } 1083 }
1084 }, 1084 },
1085 1085
1086 handleTopChange: { 1086 handleTopChange: {
1087 value: function(event) { 1087 value: function(event) {
1088 var prevPosition; 1088 var prevPosition;
1089 if(this.application.ninja.timeline.selectedStyle==="top" ||this.application.ninja.timeline.selectedStyle==="master" ){
1090 if(!event.wasSetByCode) { 1089 if(!event.wasSetByCode) {
1091 if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; 1090 if(this.savedPosition) prevPosition = [this.savedPosition + "px"];
1092 1091
1093 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Change", "timeline", prevPosition); 1092 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Change", "timeline", prevPosition);
1094 this.savedPosition = null; 1093 this.savedPosition = null;
1095 } 1094 }
1096 } 1095
1097 } 1096 }
1098 }, 1097 },
1099 1098
1100 handleWidthChange:{ 1099 handleWidthChange:{
1101 value: function(event) { 1100 value: function(event) {
1102 var prevPosition; 1101 var prevPosition;
1103 if(this.application.ninja.timeline.selectedStyle==="width" ||this.application.ninja.timeline.selectedStyle==="master" ){ 1102
1104 if(!event.wasSetByCode) { 1103 if(!event.wasSetByCode) {
1105 if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; 1104 if(this.savedPosition) prevPosition = [this.savedPosition + "px"];
1106 1105
1107 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Change", "timeline", prevPosition); 1106 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Change", "timeline", prevPosition);
1108 this.savedPosition = null; 1107 this.savedPosition = null;
1109 } 1108 }
1110 }
1111 } 1109 }
1112 }, 1110 },
1113 1111
1114 handleHeightChange:{ 1112 handleHeightChange:{
1115 value: function(event) { 1113 value: function(event) {
1116 var prevPosition; 1114 var prevPosition;
1117 if(this.application.ninja.timeline.selectedStyle==="height" ||this.application.ninja.timeline.selectedStyle==="master" ){ 1115
1118 if(!event.wasSetByCode) { 1116 if(!event.wasSetByCode) {
1119 if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; 1117 if(this.savedPosition) prevPosition = [this.savedPosition + "px"];
1120 1118
1121 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Change", "timeline", prevPosition); 1119 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Change", "timeline", prevPosition);
1122 this.savedPosition = null; 1120 this.savedPosition = null;
1123 } 1121 }
1124 }
1125 } 1122 }
1126 }, 1123 },
1127 1124
1128 handleLeftChanging: { 1125 handleLeftChanging: {
1129 value: function(event) { 1126 value: function(event) {
1130
1131 if(this.application.ninja.timeline.selectedStyle==="left" ||this.application.ninja.timeline.selectedStyle==="master" ){
1132 if(!event.wasSetByCode) { 1127 if(!event.wasSetByCode) {
1133 if(!this.savedPosition) this.savedPosition = this.leftPosition; 1128 if(!this.savedPosition) this.savedPosition = this.leftPosition;
1134 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Changing", "timeline"); 1129 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Changing", "timeline");
1135 } 1130 }
1136 }
1137
1138 } 1131 }
1139 }, 1132 },
1140 1133
1141 handleTopChanging: { 1134 handleTopChanging: {
1142 value: function(event) { 1135 value: function(event) {
1143 if(this.application.ninja.timeline.selectedStyle==="top" ||this.application.ninja.timeline.selectedStyle==="master" ){
1144 if(!event.wasSetByCode) { 1136 if(!event.wasSetByCode) {
1145 if(!this.savedPosition) this.savedPosition = this.topPosition; 1137 if(!this.savedPosition) this.savedPosition = this.topPosition;
1146 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Changing", "timeline"); 1138 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Changing", "timeline");
1147 } 1139 }
1148 }
1149
1150 } 1140 }
1151 }, 1141 },
1152 1142
1153 handleWidthChanging:{ 1143 handleWidthChanging:{
1154 value: function(event) { 1144 value: function(event) {
1155 if(this.application.ninja.timeline.selectedStyle==="width" ||this.application.ninja.timeline.selectedStyle==="master" ){
1156 if(!event.wasSetByCode) { 1145 if(!event.wasSetByCode) {
1157 if(!this.savedPosition) this.savedPosition = this.dtextScaleX; 1146 if(!this.savedPosition) this.savedPosition = this.dtextScaleX;
1158 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Changing", "timeline"); 1147 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Changing", "timeline");
1159 } 1148 }
1160 }
1161
1162 } 1149 }
1163 }, 1150 },
1164 1151
1165 handleHeightChanging:{ 1152 handleHeightChanging:{
1166 value: function(event) { 1153 value: function(event) {
1167 if(this.application.ninja.timeline.selectedStyle==="height" ||this.application.ninja.timeline.selectedStyle==="master" ){
1168 if(!event.wasSetByCode) { 1154 if(!event.wasSetByCode) {
1169 if(!this.savedPosition) this.savedPosition = this.dtextScaleY; 1155 if(!this.savedPosition) this.savedPosition = this.dtextScaleY;
1170 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Changing", "timeline"); 1156 this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Changing", "timeline");
1171 } 1157 }
1172 }
1173
1174 } 1158 }
1175 }, 1159 },
1176 1160
@@ -1405,6 +1389,7 @@ var Layer = exports.Layer = Montage.create(Component, {
1405 } 1389 }
1406 } 1390 }
1407 } 1391 }
1408 /* End: Logging routines */ 1392
1393 /* End: Event handlers */
1409 1394
1410}); 1395});