flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Added "internalDisplay" property to HTMLElementWrapper so layouts (on the JavaScript/HTML side) could set their preferred display style when elements were hidden or shown.
Date Wed, 11 Mar 2015 15:39:16 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 4ba5cb8ec -> c4811e365


Added "internalDisplay" property to HTMLElementWrapper so layouts (on the JavaScript/HTML
side) could set their preferred display style when elements were hidden or shown.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c4811e36
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c4811e36
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c4811e36

Branch: refs/heads/develop
Commit: c4811e365112f3db5211ca327e145df17ee0dba7
Parents: 4ba5cb8
Author: Peter Ent <pent@apache.org>
Authored: Wed Mar 11 11:39:12 2015 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed Mar 11 11:39:12 2015 -0400

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/ContainerBase.js     | 2 +-
 .../FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js   | 9 ++++++++-
 frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js     | 2 +-
 .../org/apache/flex/html/beads/layouts/ButtonBarLayout.js   | 1 +
 .../apache/flex/html/beads/layouts/NonVirtualBasicLayout.js | 1 +
 .../html/beads/layouts/NonVirtualBasicScrollingLayout.js    | 1 +
 .../flex/html/beads/layouts/NonVirtualHorizontalLayout.js   | 1 +
 .../flex/html/beads/layouts/NonVirtualVerticalLayout.js     | 1 +
 .../src/org/apache/flex/html/beads/layouts/TileLayout.js    | 1 +
 9 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index 18bf504..778d61b 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -130,7 +130,7 @@ org_apache_flex_core_ContainerBase.prototype.get_MXMLDescriptor = function()
{
 /**
  * @expose
  * @param {Object} doc The document.
- * @param {Array} desc The descriptor data;
+ * @param {Array} desc The descriptor data.
  */
 org_apache_flex_core_ContainerBase.prototype.setMXMLDescriptor =
     function(doc, desc) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
index cc38ec7..055a04a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -58,6 +58,13 @@ org_apache_flex_core_HTMLElementWrapper.prototype.strand = null;
 
 
 /**
+ * @protected
+ * @type {boolean}
+ */
+org_apache_flex_core_HTMLElementWrapper.prototype.internalDisplay = 'none';
+
+
+/**
  * @expose
  * @param {Object} bead The new bead.
  */
@@ -172,7 +179,7 @@ goog.events.BrowserEvent.prototype.get_target = function() {
  * Hack to allow event.currentTarget expressions to work
  *
  * @expose
- * @return {?Node|Object} The wrapping object.
+ * @return {Node|Object} The wrapping object.
  */
 goog.events.BrowserEvent.prototype.get_currentTarget = function() {
   // if it is a faked event so just return the currentTarget

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index cd71d13..b4c99a4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -831,7 +831,7 @@ org_apache_flex_core_UIBase.prototype.set_visible = function(value) {
       if (this.lastDisplay_) {
         this.positioner.style.display = this.lastDisplay_;
       } else {
-        this.positioner.style.display = 'block';
+        this.positioner.style.display = this.positioner.internalDisplay;
       }
       this.dispatchEvent(new org_apache_flex_events_Event('show'));
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
index f87f2ff..5c6572c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
@@ -108,6 +108,7 @@ org_apache_flex_html_beads_layouts_ButtonBarLayout.
     ir.set_y(0);
     ir.set_height(useHeight);
     ir.set_x(xpos);
+    ir.element.internalDisplay = 'inline-block';
     ir.element.style['vertical-align'] = 'middle';
     ir.element.style['text-align'] = 'center';
     ir.element.style['left-margin'] = 'auto';

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
index 26ee24e..52791ea 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
@@ -112,6 +112,7 @@ org_apache_flex_html_beads_layouts_NonVirtualBasicLayout.
   n = contentView.get_numElements();
   for (i = 0; i < n; i++) {
     var child = contentView.getElementAt(i);
+    child.positioner.internalDisplay = 'none';
     var left = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'left');
     var right = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'right');
     var top = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'top');

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
index c7b95a5..7297f95 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
@@ -71,6 +71,7 @@ org_apache_flex_html_beads_layouts_NonVirtualBasicScrollingLayout.
   n = contentView.get_numElements();
   for (i = 0; i < n; i++) {
     var child = contentView.getElementAt(i);
+    child.positioner.internalDisplay = 'none';
     var left = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'left');
     var right = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'right');
     var top = org_apache_flex_core_ValuesManager.valuesImpl.getValue(child, 'top');

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
index fcf067a..34e5365 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualHorizontalLayout.js
@@ -106,6 +106,7 @@ org_apache_flex_html_beads_layouts_NonVirtualHorizontalLayout.
   for (i = 0; i < n; i++)
   {
     var child = children[i];
+    child.internalDisplay = 'inline-block';
     if (child.style.display == 'none')
       child.lastDisplay_ = 'inline-block';
     else

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
index 2e017c5..0fd470d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualVerticalLayout.js
@@ -102,6 +102,7 @@ org_apache_flex_html_beads_layouts_NonVirtualVerticalLayout.
   for (i = 0; i < n; i++)
   {
     var child = children[i];
+    child.internalDisplay = 'block';
     if (child.style.display === 'none') {
       child.lastDisplay_ = 'block';
     } else {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4811e36/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js
index 5b95491..38cc680 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/TileLayout.js
@@ -143,6 +143,7 @@ org_apache_flex_html_beads_layouts_TileLayout.
   for (i = 0; i < n; i++)
   {
     var child = children[i].flexjs_wrapper;
+    child.positioner.internalDisplay = 'inline-block';
     child.set_width(useWidth);
     child.set_height(useHeight);
     child.set_x(xpos);


Mime
View raw message