don't advance movies by a frame when resizing
This commit is contained in:
parent
7102772f63
commit
9a36a6ec69
1 changed files with 6 additions and 1 deletions
|
@ -119,8 +119,13 @@ function OutfitMovieLayer({
|
||||||
movieClip.scaleX = internalWidth / library.properties.width;
|
movieClip.scaleX = internalWidth / library.properties.width;
|
||||||
movieClip.scaleY = internalHeight / library.properties.height;
|
movieClip.scaleY = internalHeight / library.properties.height;
|
||||||
|
|
||||||
// Ensure that we update here, in case the movie is paused or not animated.
|
// Redraw the stage with the new dimensions - but with `tickOnUpdate` set
|
||||||
|
// to `false`, so that we don't advance by a frame. This keeps us
|
||||||
|
// really-paused if we're paused, and avoids skipping ahead by a frame if
|
||||||
|
// we're playing.
|
||||||
|
stage.tickOnUpdate = false;
|
||||||
stage.update();
|
stage.update();
|
||||||
|
stage.tickOnUpdate = true;
|
||||||
}, [stage, library, movieClip, internalWidth, internalHeight]);
|
}, [stage, library, movieClip, internalWidth, internalHeight]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue