File tree 1 file changed +10
-2
lines changed
src/timeline/js/directives
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -331,8 +331,16 @@ App.directive("tlClip", function ($timeout) {
331
331
332
332
// Move all other selected clips with this one if we have more than one clip
333
333
$ ( ".ui-selected" ) . each ( function ( ) {
334
- var newY = move_clips [ $ ( this ) . attr ( "id" ) ] [ "top" ] + y_offset ;
335
- var newX = move_clips [ $ ( this ) . attr ( "id" ) ] [ "left" ] + x_offset ;
334
+ clip_name = $ ( this ) . attr ( "id" ) ;
335
+ var newX , newY ;
336
+ 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 ;
339
+ } else {
340
+ move_clips [ clip_name ] = { } ;
341
+ newY = this . style . top + y_offset ;
342
+ newX = this . style . top + y_offset ;
343
+ }
336
344
//update the clip location in the array
337
345
move_clips [ $ ( this ) . attr ( "id" ) ] [ "top" ] = newY ;
338
346
move_clips [ $ ( this ) . attr ( "id" ) ] [ "left" ] = newX ;
You can’t perform that action at this time.
0 commit comments