You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2022/06/26 11:29:04 UTC

[royale-asjs] branch develop updated: Emulation - make sure internal changes in Resize effect don't affect subsequent plays

This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new b9877a73ac Emulation - make sure internal changes in Resize effect don't affect subsequent plays
b9877a73ac is described below

commit b9877a73ac992c5534c40b75abb0f66d4ce1ca52
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Sun Jun 26 14:27:52 2022 +0300

    Emulation - make sure internal changes in Resize effect don't affect
    subsequent plays
---
 .../MXRoyale/src/main/royale/mx/effects/Resize.as  | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Resize.as b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Resize.as
index b2e0f466cd..a634717df8 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Resize.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/effects/Resize.as
@@ -53,8 +53,28 @@ public class Resize extends org.apache.royale.effects.Resize
     public function Resize(target:IUIBase = null)
     {
         super(target);
+    }
 
-		
+    private var _originalHeightBy:Number;
+    private var _originalWidthBy:Number;
+    /**
+     *  @private
+     *  Store values that might change by parent class
+     */
+    override public function play():void
+    {
+        _originalHeightBy = heightBy;
+        _originalWidthBy = widthBy;
+        super.play();
+    }
+
+    override public function onTweenEnd(value:Number):void
+    {
+        super.onTweenEnd(value);
+        // These public properties may have been internally changed by parent class
+        // TODO refactor mx effects to use mx tween
+        heightBy = _originalHeightBy;
+        widthBy = _originalWidthBy;
     }
    
 }