This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch feature/layout-optimization
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/feature/layout-optimization by
this push:
new 26f5138 JS does not seem to need the measuring
26f5138 is described below
commit 26f51388f08ba8f5fc1beb33f1f886bd8696cd74
Author: Harbs <[email protected]>
AuthorDate: Thu Mar 29 01:33:28 2018 +0300
JS does not seem to need the measuring
---
.../royale/org/apache/royale/core/LayoutBase.as | 34 +++++++++++++---------
.../org/apache/royale/binding/DataBindingBase.as | 2 +-
.../org/apache/royale/html5/TransformBead.as | 4 +--
3 files changed, 24 insertions(+), 16 deletions(-)
diff --git
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
index d48c414..50e0f08 100644
---
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
+++
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
@@ -312,14 +312,19 @@ package org.apache.royale.core
if (isLayoutRunning) return;
isLayoutRunning = true;
- LayoutManager.addMeasurement(host);
+ COMPILE::SWF
+ {
+ host.measuredHeight = host.height;
+ host.measuredWidth = host.width;
+ }
+ // LayoutManager.addMeasurement(host);
var viewBead:ILayoutHost = (host as
ILayoutParent).getLayoutHost();
viewBead.beforeLayout();
- LayoutManager.addLayout(
- function ():void
- {
+ // LayoutManager.addLayout(
+ // function ():void
+ // {
if (layout()) {
viewBead.afterLayout();
}
@@ -328,17 +333,20 @@ package org.apache.royale.core
host.dispatchEvent(new
Event("layoutComplete"));
- // check sizes to see if layout changed
the size or not
- // and send an event to re-layout
parent of host
- if (host.width != host.measuredWidth ||
- host.height !=
host.measuredHeight)
+ COMPILE::SWF
{
- isLayoutRunning = true;
- host.dispatchEvent(new
Event("sizeChanged"));
- isLayoutRunning = false;
+ // check sizes to see if layout
changed the size or not
+ // and send an event to
re-layout parent of host
+ if (host.width !=
host.measuredWidth ||
+ host.height !=
host.measuredHeight)
+ {
+ isLayoutRunning = true;
+ host.dispatchEvent(new
Event("sizeChanged"));
+ isLayoutRunning = false;
+ }
}
- }
- );
+ // }
+ // );
}
diff --git
a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/DataBindingBase.as
b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/DataBindingBase.as
index a45a265..dfb797e 100644
---
a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/DataBindingBase.as
+++
b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/DataBindingBase.as
@@ -71,8 +71,8 @@ package org.apache.royale.binding
}
/**
+ * @royaleemitcoercion org.apache.royale.core.IStrand
* @royaleignorecoercion org.apache.royale.core.IBead
- * @royaleignorecoercion org.apache.royale.core.IStrand
* @royaleignorecoercion org.apache.royale.events.IEventDispatcher
*/
protected function prepareCreatedBinding(binding:IBinding,
bindingObject:Object, destinationObject:Object = null):void
diff --git
a/frameworks/projects/HTML5/src/main/royale/org/apache/royale/html5/TransformBead.as
b/frameworks/projects/HTML5/src/main/royale/org/apache/royale/html5/TransformBead.as
index ce9a380..ffc060b 100644
---
a/frameworks/projects/HTML5/src/main/royale/org/apache/royale/html5/TransformBead.as
+++
b/frameworks/projects/HTML5/src/main/royale/org/apache/royale/html5/TransformBead.as
@@ -37,9 +37,9 @@ package org.apache.royale.html5
var fjsm:Matrix = transformModel.matrix;
var matrixArray:Array = [fjsm.a , fjsm.b, fjsm.c,
fjsm.d, fjsm.tx, fjsm.ty];
var transformStr:String = "matrix(" +
matrixArray.join(",") + ")";
- element.style.transform = transformStr;
- element.style.transformOrigin = "0px 0px";
element.style.position = "absolute";
+ element.style.transformOrigin = "0px 0px";
+ element.style.transform = transformStr;
}
}
--
To stop receiving notification emails like this one, please contact
[email protected].