Skip to content

Commit ae16ed9

Browse files
author
Jackson
committed
Fixed treating adding y_offset to x
1 parent d421f20 commit ae16ed9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/timeline/js/directives/clip.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,12 @@ App.directive("tlClip", function ($timeout) {
334334
clip_name = $(this).attr("id");
335335
var newX, newY;
336336
if (move_clips[clip_name] && ( move_clips[clip_name]['top'] && move_clips[clip_name]['left'] )) {
337-
newY = move_clips[clip_name]['top'] = this.style.top + y_offset;
338-
newX = move_clips[clip_name]['left'] + y_offset;
337+
newY = move_clips[clip_name]['top'] + y_offset;
338+
newX = move_clips[clip_name]['left'] + x_offset;
339339
} else {
340340
move_clips[clip_name] = {};
341341
newY = this.style.top + y_offset;
342-
newX = this.style.top + y_offset;
342+
newX = this.style.left + x_offset;
343343
}
344344
//update the clip location in the array
345345
move_clips[$(this).attr("id")]["top"] = newY;

src/timeline/js/directives/transition.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,13 @@ App.directive("tlTransition", function () {
288288
transition_name = $(this).attr("id");
289289
var newX, newY;
290290
if (move_clips[transition_name] && ( move_clips[transition_name]['top'] && move_clips[clip_name]['left'] )) {
291-
newY = move_clips[transition_name]['top'] = this.style.top + y_offset;
292-
newX = move_clips[transition_name]['left'] + y_offset;
291+
newY = move_clips[transition_name]['top'] + y_offset;
292+
newX = move_clips[transition_name]['left'] + x_offset;
293293
} else {
294294
// If this transition is not yet in move_clips, add it.
295295
move_clips[transition_name] = {};
296296
newY = this.style.top + y_offset;
297-
newX = this.style.top + y_offset;
297+
newX = this.style.left + x_offset;
298298
}
299299
// Update the transition location in the array
300300
move_transitions[$(this).attr("id")]["top"] = newY;

0 commit comments

Comments
 (0)