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/09/08 08:39:29 UTC
[2/5] git commit: [flex-asjs] [refs/heads/develop] - when % width,
you get fractional numbers yet offsetWidth rounds down,
so check the computed width which will include the fractional part,
otherwise you'll get a half-pixel gap
when % width, you get fractional numbers yet offsetWidth rounds down, so check the computed width which will include the fractional part, otherwise you'll get a half-pixel gap
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/606b28bf
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/606b28bf
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/606b28bf
Branch: refs/heads/develop
Commit: 606b28bfe9f6c9275069db97b4868b26f2ef75ac
Parents: 3ca1f7d
Author: Alex Harui <ah...@apache.org>
Authored: Sat Sep 5 22:13:18 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Sat Sep 5 22:13:18 2015 -0700
----------------------------------------------------------------------
.../HTML/js/src/org/apache/flex/html/beads/PanelView.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/606b28bf/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 f4132ef..3965772 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
@@ -110,18 +110,21 @@ org.apache.flex.html.beads.PanelView.
prototype.layoutViewBeforeContentLayout = function() {
var vm = this.viewportModel;
var host = this._strand;
-
+ var w = host.width;
+ var s = window.getComputedStyle(host.element);
+ var sw = Number(s.width.substring(0, s.width.length - 2));
+ if (sw > w) w = sw;
vm.borderMetrics = org.apache.flex.utils.CSSContainerUtils.getBorderMetrics(host);
this.titleBar.x = 0;
this.titleBar.y = 0;
if (!host.isWidthSizedToContent())
- this.titleBar.width = host.width - vm.borderMetrics.left - vm.borderMetrics.right;
+ this.titleBar.width = w - vm.borderMetrics.left - vm.borderMetrics.right;
vm.chromeMetrics = this.getChromeMetrics();
this.viewport.setPosition(vm.chromeMetrics.left,
vm.chromeMetrics.top);
this.viewport.layoutViewportBeforeContentLayout(
!host.isWidthSizedToContent() ?
- host.width - vm.borderMetrics.left - vm.borderMetrics.right -
+ w - vm.borderMetrics.left - vm.borderMetrics.right -
vm.chromeMetrics.left - vm.chromeMetrics.right : NaN,
!host.isHeightSizedToContent() ?
host.height - vm.borderMetrics.top - vm.borderMetrics.bottom -