You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/11/23 07:39:31 UTC
[royale-asjs] branch develop updated (490f032 -> 259f0d5)
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.
from 490f032 Scroller measures viewport. Should fix #944
new 7628fb6 special case height/width in states
new 259f0d5 delay state setting until skin is set
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../royale/core/StatesWithTransitionsImpl.as | 27 +++++++++++++++++-----
.../supportClasses/SkinnableComponent.as | 6 +++++
2 files changed, 27 insertions(+), 6 deletions(-)
[royale-asjs] 02/02: delay state setting until skin is set
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 259f0d51526e9ddf0edabb85b4f8788a2a6476ee
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Nov 22 23:36:22 2020 -0800
delay state setting until skin is set
---
.../royale/spark/components/supportClasses/SkinnableComponent.as | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as
index 4122bcb..8de275a 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as
@@ -231,6 +231,7 @@ public class SkinnableComponent extends UIComponent
}
+ private var skinStateInvalidated:Boolean = false;
/**
* Marks the component so that the new state of the skin is set
@@ -243,9 +244,12 @@ public class SkinnableComponent extends UIComponent
*/
public function invalidateSkinState():void
{
+ skinStateInvalidated = true;
+
if (skin)
{
skin.currentState = getCurrentSkinState();
+ skinStateInvalidated = false;
}
}
@@ -288,6 +292,8 @@ public class SkinnableComponent extends UIComponent
_skin = value;
findSkinParts();
+ if (skinStateInvalidated)
+ invalidateSkinState();
dispatchEvent(new Event("skinChanged"));
}
[royale-asjs] 01/02: special case height/width in states
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 7628fb6071634646344a74f5fde8f50509dd26de
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Nov 22 23:34:54 2020 -0800
special case height/width in states
---
.../royale/core/StatesWithTransitionsImpl.as | 27 +++++++++++++++++-----
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as b/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
index 041ff67..587435a 100644
--- a/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
+++ b/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
@@ -65,6 +65,19 @@ package org.apache.royale.core
private var _strand:IStrand;
private var sawInitComplete:Boolean;
+
+ /**
+ * @private
+ * This is a table of pseudonyms.
+ * Whenever the property being overridden is found in this table,
+ * the pseudonym is saved/restored instead.
+ */
+ private static const PSEUDONYMS:Object =
+ {
+ width: "explicitWidth",
+ height: "explicitHeight",
+ currentState: "currentStateDeferred"
+ };
/**
* @copy org.apache.royale.core.IBead#strand
@@ -262,10 +275,11 @@ package org.apache.royale.core
else if (o is SetProperty)
{
var sp:SetProperty = SetProperty(o);
+ var propName:String = PSEUDONYMS[sp.name] || sp.name;
if (sp.target != null)
- sp.document[sp.target][sp.name] = sp.previousValue;
+ sp.document[sp.target][propName] = sp.previousValue;
else
- sp.document[sp.name] = sp.previousValue;
+ sp.document[propName] = sp.previousValue;
}
else if (o is SetEventHandler)
{
@@ -359,15 +373,16 @@ package org.apache.royale.core
else if (o is SetProperty)
{
var sp:SetProperty = SetProperty(o);
+ var propName:String = PSEUDONYMS[sp.name] || sp.name;
if (sp.target != null)
{
- sp.previousValue = sp.document[sp.target][sp.name];
- sp.document[sp.target][sp.name] = sp.value;
+ sp.previousValue = sp.document[sp.target][propName];
+ sp.document[sp.target][propName] = sp.value;
}
else
{
- sp.previousValue = sp.document[sp.name];
- sp.document[sp.name] = sp.value;
+ sp.previousValue = sp.document[propName];
+ sp.document[propName] = sp.value;
}
}
else if (o is SetEventHandler)