flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [6/9] git commit: [flex-asjs] [refs/heads/develop] - Resolve merge conflicts
Date Sat, 04 May 2013 18:19:48 GMT
Resolve merge conflicts

Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 34b0f2762804b13d6b46336c954118b170423669
Parents: e07e28a
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Sat May 4 07:47:29 2013 +0200
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Sat May 4 07:47:29 2013 +0200

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/core/UIBase.js   |   40 +++++++++++++++
 .../js/FlexJS/src/org/apache/flex/core/ViewBase.js |   32 ++++++------
 2 files changed, 56 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/34b0f276/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 1a77aef..5caa784 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -26,6 +26,12 @@ org.apache.flex.core.UIBase = function() {
   goog.base(this);
 
   /**
+   * @private
+   * @type {string}
+   */
+  this.lastDisplay;
+
+  /**
    * @protected
    * @type {Object}
    */
@@ -179,3 +185,37 @@ org.apache.flex.core.UIBase.prototype.set_model = function(value) {
   }
 };
 
+/**
+ * @expose
+ * @this {org.apache.flex.core.UIBase}
+ * @return {object} True if visible.
+ */
+org.apache.flex.core.UIBase.prototype.get_visible = function() {
+    return this.element.style.display != 'none';
+};
+
+/**
+ * @expose
+ * @this {org.apache.flex.core.UIBase}
+ * @param {object} value The new model.
+ */
+org.apache.flex.core.UIBase.prototype.set_visible = function(value) {
+    var oldValue = this.element.style.display != 'none';
+    if (value != oldValue)
+    {
+        if (!value)
+        {
+            this.lastDisplay = this.element.style.display;
+            this.element.style.display = 'none';
+            this.dispatchEvent(new org.apache.flex.events.Event('hide'));
+        }
+        else
+        {
+            if (this.lastDisplay)
+                this.element.style.display = this.lastDisplay;
+            else
+                this.element.style.display = 'block';
+            this.dispatchEvent(new org.apache.flex.events.Event('show'));
+        }
+    }
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/34b0f276/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
index 22eee24..087b381 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -14,56 +14,56 @@
 
 goog.provide('org.apache.flex.core.ViewBase');
 
-goog.require('org.apache.flex.FlexGlobal');
-
 goog.require('org.apache.flex.core.UIBase');
-
 goog.require('org.apache.flex.utils.MXMLDataInterpreter');
 
+
+
 /**
  * @constructor
  * @extends {org.apache.flex.core.UIBase}
  */
 org.apache.flex.core.ViewBase = function() {
-    org.apache.flex.core.UIBase.call(this);
-
-     /**
-      * @private
-      * @type {org.apache.flex.core.ViewBase}
-      */
-      this.currentObject_;
+  goog.base(this);
 };
 goog.inherits(org.apache.flex.core.ViewBase, org.apache.flex.core.UIBase);
 
+
 /**
  * @expose
  * @type {Object}
  */
 org.apache.flex.core.ViewBase.prototype.applicationModel;
 
+
 /**
  * @expose
  * @type {Array}
  */
 org.apache.flex.core.ViewBase.prototype.MXMLProperties;
 
+
 /**
  * @expose
  * @type {Array}
  */
 org.apache.flex.core.ViewBase.prototype.MXMLDescriptor;
 
+
 /**
  * @this {org.apache.flex.core.ViewBase}
  * @param {Object} model The model for this view.
  */
 org.apache.flex.core.ViewBase.prototype.initUI = function(model) {
-    this.applicationModel = model;
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
-            this.get_MXMLProperties());
-    org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
-            this, this.get_MXMLDescriptor());
-    this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));
+  this.applicationModel = model;
+
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLProperties(this,
+      this.get_MXMLProperties());
+
+  org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this,
+      this, this.get_MXMLDescriptor());
+
+  this.dispatchEvent(new org.apache.flex.events.Event('initComplete'));
 };
 
 /**


Mime
View raw message