Skip to content

Commit a7dd95a

Browse files
committed
Renaming duplicate variable declarations (probably should split this out into functions at some point... too much duplicate code)
1 parent e8135f5 commit a7dd95a

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/timeline/js/controllers.js

+13-12
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ App.controller("TimelineCtrl", function ($scope) {
170170
}
171171
// Determine if this property is a Color Keyframe
172172
if (typeof object[child] === "object" && "red" in object[child]) {
173-
for (var point = 0; point < object[child]["red"].Points.length; point++) {
174-
var co = object[child]["red"].Points[point].co;
175-
if (co.X >= clip_start_x && co.X <= clip_end_x) {
173+
for (var color_point = 0; color_point < object[child]["red"].Points.length; color_point++) {
174+
var color_co = object[child]["red"].Points[color_point].co;
175+
if (color_co.X >= clip_start_x && color_co.X <= clip_end_x) {
176176
// Only add keyframe coordinates that are within the bounds of the clip
177-
keyframes[co.X] = co.Y;
177+
keyframes[color_co.X] = color_co.Y;
178178
}
179179
}
180180
}
@@ -190,21 +190,21 @@ App.controller("TimelineCtrl", function ($scope) {
190190
}
191191
// Determine if this property is a Keyframe
192192
if (typeof object["effects"][effect][effect_prop] === "object" && "Points" in object["effects"][effect][effect_prop]) {
193-
for (var point = 0; point < object["effects"][effect][effect_prop].Points.length; point++) {
194-
var co = object["effects"][effect][effect_prop].Points[point].co;
195-
if (co.X >= clip_start_x && co.X <= clip_end_x) {
193+
for (var effect_point = 0; effect_point < object["effects"][effect][effect_prop].Points.length; effect_point++) {
194+
var effect_co = object["effects"][effect][effect_prop].Points[effect_point].co;
195+
if (effect_co.X >= clip_start_x && effect_co.X <= clip_end_x) {
196196
// Only add keyframe coordinates that are within the bounds of the clip
197-
keyframes[co.X] = co.Y;
197+
keyframes[effect_co.X] = effect_co.Y;
198198
}
199199
}
200200
}
201201
// Determine if this property is a Color Keyframe
202202
if (typeof object["effects"][effect][effect_prop] === "object" && "red" in object["effects"][effect][effect_prop]) {
203-
for (var point = 0; point < object["effects"][effect][effect_prop]["red"].Points.length; point++) {
204-
var co = object["effects"][effect][effect_prop]["red"].Points[point].co;
205-
if (co.X >= clip_start_x && co.X <= clip_end_x) {
203+
for (var effect_color_point = 0; effect_color_point < object["effects"][effect][effect_prop]["red"].Points.length; effect_color_point++) {
204+
var effect_color_co = object["effects"][effect][effect_prop]["red"].Points[effect_color_point].co;
205+
if (effect_color_co.X >= clip_start_x && effect_color_co.X <= clip_end_x) {
206206
// Only add keyframe coordinates that are within the bounds of the clip
207-
keyframes[co.X] = co.Y;
207+
keyframes[effect_color_co.X] = effect_color_co.Y;
208208
}
209209
}
210210
}
@@ -682,6 +682,7 @@ App.controller("TimelineCtrl", function ($scope) {
682682
// Show timeline context menu
683683
$scope.showTimelineMenu = function (e, layer_number) {
684684
if ($scope.Qt && !$scope.enable_razor) {
685+
/*eslint new-cap: [2, {"capIsNewExceptions": ["timeline.ShowTimelineMenu"]}]*/
685686
timeline.ShowTimelineMenu($scope.getJavaScriptPosition(e.pageX), layer_number);
686687
}
687688
};

0 commit comments

Comments
 (0)