Skip to content

Commit f66331d

Browse files
committed
Fixing some Codacy issues
1 parent 9d03ac1 commit f66331d

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/timeline/js/directives/clip.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*/
2828

2929

30+
/*global setSelections, setBoundingBox, moveBoundingBox, bounding_box */
3031
// Init variables
3132
var dragging = false;
3233
var resize_disabled = false;

src/timeline/js/directives/ruler.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*/
2828

2929

30+
/*global setSelections, setBoundingBox, moveBoundingBox, bounding_box */
3031
// Variables for panning by middle click
3132
var is_scrolling = false;
3233
var starting_scrollbar = {x: 0, y: 0};

src/timeline/js/directives/transition.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*/
2828

2929

30+
/*global setSelections, setBoundingBox, moveBoundingBox, bounding_box */
3031
// Init Variables
3132
var dragging = false;
3233
var resize_disabled = false;

src/timeline/js/functions.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,13 @@ function setBoundingBox(scope, item, item_type="clip") {
252252
}
253253

254254
// Add in additional types of special-case bounding boxes
255-
if (item_type == "playhead") {
255+
if (item_type === "playhead") {
256256
// Center of playhead (1 pixel width)
257257
bounding_box.left += 13;
258258
bounding_box.right = bounding_box.left;
259259
bounding_box.width = 1;
260260

261-
} else if (item_type == "trimming") {
261+
} else if (item_type === "trimming") {
262262
// Edge of clip for trimming (1 pixel width)
263263
bounding_box.right = bounding_box.left;
264264
bounding_box.width = 1;
@@ -267,7 +267,7 @@ function setBoundingBox(scope, item, item_type="clip") {
267267
// Get list of current selected ids (so we can ignore their snapping x coordinates)
268268
// Unless playhead mode, where we don't want to ignore any selected clips
269269
bounding_box.selected_ids = {};
270-
if (item_type != "playhead") {
270+
if (item_type !== "playhead") {
271271
for (var clip_index = 0; clip_index < scope.project.clips.length; clip_index++) {
272272
if (scope.project.clips[clip_index].selected) {
273273
bounding_box.selected_ids[scope.project.clips[clip_index].id] = true;
@@ -280,7 +280,7 @@ function setBoundingBox(scope, item, item_type="clip") {
280280
}
281281
} else {
282282
// Get id of ruler, or trimming clip
283-
let id = item.attr('id').replace("clip_", "").replace("transition_", "");
283+
let id = item.attr("id").replace("clip_", "").replace("transition_", "");
284284
bounding_box.selected_ids[id] = true;
285285
}
286286
}
@@ -293,7 +293,7 @@ function moveBoundingBox(scope, previous_x, previous_y, x_offset, y_offset, left
293293
snapping_result.top = top;
294294

295295
// Check for shift key
296-
if (typeof(event) !== "undefined" && event.shiftKey && item_type == "clip") {
296+
if (typeof(event) !== "undefined" && event.shiftKey && item_type === "clip") {
297297
// freeze X movement for clips and transitions
298298
x_offset = 0;
299299
snapping_result.left = previous_x;

0 commit comments

Comments
 (0)