You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/08/28 07:56:54 UTC

[4/7] git commit: [flex-asjs] [refs/heads/develop] - fix contentView sizing in panel

fix contentView sizing in panel


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

Branch: refs/heads/develop
Commit: 18e96b0eaf4323a7ab0ded00ab3bdaacb2c73ae5
Parents: a8f5e04
Author: Alex Harui <ah...@apache.org>
Authored: Thu Aug 27 14:39:22 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Aug 27 14:39:22 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/18e96b0e/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
index cd903cc..2952327 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/PanelView.js
@@ -116,6 +116,23 @@ Object.defineProperties(org.apache.flex.html.beads.PanelView.prototype, {
 
 /**
  * @override
+ */
+org.apache.flex.html.beads.PanelView.
+    prototype.adjustSizeBeforeLayout = function() {
+    var host = this._strand;
+    this.viewportModel.contentWidth = host.width;
+    this.viewportModel.contentHeight = host.height - this.titleBar_.height;
+    this.viewportModel.contentX = 0;
+    this.viewportModel.contentY = 0;
+    if (!host.isWidthSizedToContent())
+      this.contentView.width = this.viewportModel.contentWidth;
+    if (!host.isHeightSizedToContent())
+      this.contentView.height = this.viewportModel.contentHeight;
+};
+
+
+/**
+ * @override
  * @param {boolean} widthSizedToContent True if the width is determined by content.
  * @param {boolean} heightSizedToContent True if the height is determined by content.
  */