flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [10/22] git commit: [flex-asjs] [refs/heads/develop] - get panel to accept custom titlebar
Date Fri, 09 Jan 2015 16:10:23 GMT
get panel to accept custom titlebar


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

Branch: refs/heads/develop
Commit: b6f5f20bc605b2e1fb1d1d6c39b988927f1ce000
Parents: 184b7e9
Author: Alex Harui <aharui@apache.org>
Authored: Wed Jan 7 20:39:43 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 9 08:09:48 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/PanelView.js | 23 +++++++++++++-------
 1 file changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b6f5f20b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
index 942127d..633b1db 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/PanelView.js
@@ -14,6 +14,8 @@
 
 goog.provide('org.apache.flex.html.beads.PanelView');
 
+goog.require('org.apache.flex.core.IBeadView');
+
 
 
 /**
@@ -37,7 +39,8 @@ org.apache.flex.html.beads.PanelView = function() {
 org.apache.flex.html.beads.PanelView
   .prototype.FLEXJS_CLASS_INFO =
     { names: [{ name: 'PanelView',
-                qName: 'org.apache.flex.html.beads.PanelView'}] };
+                qName: 'org.apache.flex.html.beads.PanelView'}],
+      interfaces: [org.apache.flex.core.IBeadView] };
 
 
 /**
@@ -49,7 +52,11 @@ org.apache.flex.html.beads.PanelView.prototype.set_strand =
 
   this.strand_ = value;
 
-  this.strand_.titleBar = new org.apache.flex.html.TitleBar();
+  if (!this.titleBar)
+    this.strand_.titleBar = new org.apache.flex.html.TitleBar();
+  else
+    this.strand_.titleBar = this.titleBar;
+
   this.strand_.titleBar.set_id('titleBar');
   this.strand_.titleBar.set_model(this.strand_.get_model());
 
@@ -87,9 +94,9 @@ org.apache.flex.html.beads.PanelView.prototype.changeHandler =
   var p = this.strand_.positioner;
   if (!strand.isWidthSizedToContent()) {
     var w = strand.get_width();
-	w -= p.offsetWidth - p.clientWidth;
+    w -= p.offsetWidth - p.clientWidth;
     strand.titleBar.setWidth(w);
-    strand.contentArea.style.width = w.toString() + "px";
+    strand.contentArea.style.width = w.toString() + 'px';
     if (strand.controlBar)
       strand.controlBar.setWidth(w);
   }
@@ -98,10 +105,10 @@ org.apache.flex.html.beads.PanelView.prototype.changeHandler =
     var b = 0;
     if (strand.controlBar)
       b = strand.controlBar.get_height();
-    strand.contentArea.style.top = t.toString() + "px";
-	var h = strand.get_height() - t - b;
-	h -= p.offsetHeight - p.clientHeight;
-    strand.contentArea.style.height = h.toString() + "px";
+    strand.contentArea.style.top = t.toString() + 'px';
+    var h = strand.get_height() - t - b;
+    h -= p.offsetHeight - p.clientHeight;
+    strand.contentArea.style.height = h.toString() + 'px';
   }
   this.strand_.dispatchEvent('layoutNeeded');
 };


Mime
View raw message