get scrolling to work
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6a410789 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6a410789 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6a410789 Branch: refs/heads/develop Commit: 6a41078974bbdc386ae5c043a42c9048e3c5aeb2 Parents: 6653f14 Author: Alex Harui <[email protected]> Authored: Tue Jan 6 21:38:15 2015 -0800 Committer: Alex Harui <[email protected]> Committed: Fri Jan 9 08:09:47 2015 -0800 ---------------------------------------------------------------------- .../layouts/NonVirtualBasicScrollingLayout.js | 35 +++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a410789/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 97e4700..1c770bb 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 @@ -61,4 +61,37 @@ org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout. */ org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout. prototype.changeHandler = function(event) { -}; + var i, n, h, w; + + var viewBead = this.strand_.getBeadByType(org.apache.flex.core.ILayoutParent); + var contentView = viewBead.get_contentView(); + contentView.element.style.overflow = 'auto'; + w = contentView.get_width(); + h = contentView.get_height(); + n = contentView.get_numElements(); + for (i = 0; i < n; i++) { + var child = contentView.getElementAt(i); + 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'); + var bottom = org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'bottom'); + + if (!isNaN(left)) { + child.positioner.style.position = 'absolute'; + child.positioner.style.left = left.toString() + 'px'; + } + if (!isNaN(top)) { + child.positioner.style.position = 'absolute'; + child.positioner.style.top = top.toString() + 'px'; + } + if (!isNaN(right)) { + child.positioner.style.position = 'absolute'; + child.positioner.style.right = right.toString() + 'px'; + } + if (!isNaN(bottom)) { + child.positioner.style.position = 'absolute'; + child.positioner.style.bottom = bottom.toString() + 'px'; + } + child.dispatchEvent('sizeChanged'); + } +}; \ No newline at end of file
