diff options
author | Kruti Shah | 2012-06-28 10:24:07 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-28 10:24:07 -0700 |
commit | 72bc34c58d52db0cc7eb1e5b647e9e4aa697a4c0 (patch) | |
tree | 7c17a441a2c0100a2da465f273836b97e117fe5b /js | |
parent | 8aef94d26e172785463161899dfcc877b4233bdb (diff) | |
download | ninja-72bc34c58d52db0cc7eb1e5b647e9e4aa697a4c0.tar.gz |
Bug Fix : Hot text updates with keyframe selection
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 85 |
1 files changed, 36 insertions, 49 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index b4833fa2..4dd9e88a 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -1046,28 +1046,25 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
1046 | 1046 | ||
1047 | handleLeftChange: { | 1047 | handleLeftChange: { |
1048 | value: function(event) { | 1048 | value: function(event) { |
1049 | var prevPosition; | ||
1050 | if(this.application.ninja.timeline.selectedStyle==="left" ||this.application.ninja.timeline.selectedStyle==="master" ){ | ||
1051 | if(!event.wasSetByCode) { | ||
1052 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; | ||
1053 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Change", "timeline", prevPosition); | ||
1054 | this.savedPosition = null; | ||
1055 | } | ||
1056 | 1049 | ||
1050 | var prevPosition; | ||
1051 | if(!event.wasSetByCode) { | ||
1052 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; | ||
1053 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Change", "timeline", prevPosition); | ||
1054 | this.savedPosition = null; | ||
1057 | } | 1055 | } |
1058 | } | 1056 | } |
1059 | }, | 1057 | }, |
1060 | 1058 | ||
1061 | handleTopChange: { | 1059 | handleTopChange: { |
1062 | value: function(event) { | 1060 | value: function(event) { |
1063 | var prevPosition; | 1061 | var prevPosition; |
1064 | if(this.application.ninja.timeline.selectedStyle==="top" ||this.application.ninja.timeline.selectedStyle==="master" ){ | ||
1065 | if(!event.wasSetByCode) { | ||
1066 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; | ||
1067 | 1062 | ||
1068 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Change", "timeline", prevPosition); | 1063 | if(!event.wasSetByCode) { |
1069 | this.savedPosition = null; | 1064 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; |
1070 | } | 1065 | |
1066 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Change", "timeline", prevPosition); | ||
1067 | this.savedPosition = null; | ||
1071 | } | 1068 | } |
1072 | } | 1069 | } |
1073 | }, | 1070 | }, |
@@ -1075,13 +1072,12 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
1075 | handleWidthChange:{ | 1072 | handleWidthChange:{ |
1076 | value: function(event) { | 1073 | value: function(event) { |
1077 | var prevPosition; | 1074 | var prevPosition; |
1078 | if(this.application.ninja.timeline.selectedStyle==="width" ||this.application.ninja.timeline.selectedStyle==="master" ){ | ||
1079 | if(!event.wasSetByCode) { | ||
1080 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; | ||
1081 | 1075 | ||
1082 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Change", "timeline", prevPosition); | 1076 | if(!event.wasSetByCode) { |
1083 | this.savedPosition = null; | 1077 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; |
1084 | } | 1078 | |
1079 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Change", "timeline", prevPosition); | ||
1080 | this.savedPosition = null; | ||
1085 | } | 1081 | } |
1086 | } | 1082 | } |
1087 | }, | 1083 | }, |
@@ -1089,13 +1085,12 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
1089 | handleHeightChange:{ | 1085 | handleHeightChange:{ |
1090 | value: function(event) { | 1086 | value: function(event) { |
1091 | var prevPosition; | 1087 | var prevPosition; |
1092 | if(this.application.ninja.timeline.selectedStyle==="height" ||this.application.ninja.timeline.selectedStyle==="master" ){ | ||
1093 | if(!event.wasSetByCode) { | ||
1094 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; | ||
1095 | 1088 | ||
1096 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Change", "timeline", prevPosition); | 1089 | if(!event.wasSetByCode) { |
1097 | this.savedPosition = null; | 1090 | if(this.savedPosition) prevPosition = [this.savedPosition + "px"]; |
1098 | } | 1091 | |
1092 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Change", "timeline", prevPosition); | ||
1093 | this.savedPosition = null; | ||
1099 | } | 1094 | } |
1100 | } | 1095 | } |
1101 | }, | 1096 | }, |
@@ -1103,11 +1098,9 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
1103 | handleLeftChanging: { | 1098 | handleLeftChanging: { |
1104 | value: function(event) { | 1099 | value: function(event) { |
1105 | 1100 | ||
1106 | if(this.application.ninja.timeline.selectedStyle==="left" ||this.application.ninja.timeline.selectedStyle==="master" ){ | 1101 | if(!event.wasSetByCode) { |
1107 | if(!event.wasSetByCode) { | 1102 | if(!this.savedPosition) this.savedPosition = this.leftPosition; |
1108 | if(!this.savedPosition) this.savedPosition = this.leftPosition; | 1103 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Changing", "timeline"); |
1109 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "left", [this.leftControl.value + "px"] , "Changing", "timeline"); | ||
1110 | } | ||
1111 | } | 1104 | } |
1112 | 1105 | ||
1113 | } | 1106 | } |
@@ -1115,37 +1108,31 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
1115 | 1108 | ||
1116 | handleTopChanging: { | 1109 | handleTopChanging: { |
1117 | value: function(event) { | 1110 | value: function(event) { |
1118 | if(this.application.ninja.timeline.selectedStyle==="top" ||this.application.ninja.timeline.selectedStyle==="master" ){ | ||
1119 | if(!event.wasSetByCode) { | ||
1120 | if(!this.savedPosition) this.savedPosition = this.topPosition; | ||
1121 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Changing", "timeline"); | ||
1122 | } | ||
1123 | } | ||
1124 | 1111 | ||
1112 | if(!event.wasSetByCode) { | ||
1113 | if(!this.savedPosition) this.savedPosition = this.topPosition; | ||
1114 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "top", [this.topControl.value + "px"] , "Changing", "timeline"); | ||
1115 | } | ||
1125 | } | 1116 | } |
1126 | }, | 1117 | }, |
1127 | 1118 | ||
1128 | handleWidthChanging:{ | 1119 | handleWidthChanging:{ |
1129 | value: function(event) { | 1120 | value: function(event) { |
1130 | if(this.application.ninja.timeline.selectedStyle==="width" ||this.application.ninja.timeline.selectedStyle==="master" ){ | ||
1131 | if(!event.wasSetByCode) { | ||
1132 | if(!this.savedPosition) this.savedPosition = this.dtextScaleX; | ||
1133 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Changing", "timeline"); | ||
1134 | } | ||
1135 | } | ||
1136 | 1121 | ||
1122 | if(!event.wasSetByCode) { | ||
1123 | if(!this.savedPosition) this.savedPosition = this.dtextScaleX; | ||
1124 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "width", [this.dtextScaleX + "px"] , "Changing", "timeline"); | ||
1125 | } | ||
1137 | } | 1126 | } |
1138 | }, | 1127 | }, |
1139 | 1128 | ||
1140 | handleHeightChanging:{ | 1129 | handleHeightChanging:{ |
1141 | value: function(event) { | 1130 | value: function(event) { |
1142 | if(this.application.ninja.timeline.selectedStyle==="height" ||this.application.ninja.timeline.selectedStyle==="master" ){ | ||
1143 | if(!event.wasSetByCode) { | ||
1144 | if(!this.savedPosition) this.savedPosition = this.dtextScaleY; | ||
1145 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Changing", "timeline"); | ||
1146 | } | ||
1147 | } | ||
1148 | 1131 | ||
1132 | if(!event.wasSetByCode) { | ||
1133 | if(!this.savedPosition) this.savedPosition = this.dtextScaleY; | ||
1134 | this.application.ninja.elementMediator.setProperty([this.layerData.stageElement], "height", [this.dtextScaleY + "px"] , "Changing", "timeline"); | ||
1135 | } | ||
1149 | } | 1136 | } |
1150 | }, | 1137 | }, |
1151 | 1138 | ||