Skip to content

Commit 9df10db

Browse files
committed
Deselect animations when clicking in the background.
1 parent 24ce1ff commit 9df10db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

js/TimelineAnimations.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ function TimelineAnimations( editor ) {
272272
container.setHeight( '100%' );
273273
container.setBackground( 'linear-gradient(#555 1px, transparent 1px) 0% 0% / 32px 32px repeat' );
274274

275+
container.dom.addEventListener( 'click', function ( event ) {
276+
277+
editor.selectAnimation( null );
278+
279+
}, true );
280+
275281
container.dom.addEventListener( 'dblclick', function ( event ) {
276282

277283
var start = event.offsetX / scale;
@@ -280,7 +286,7 @@ function TimelineAnimations( editor ) {
280286

281287
editor.createAnimation( start, end, layer );
282288

283-
} );
289+
}, true );
284290

285291
// signals
286292

0 commit comments

Comments
 (0)