fix infinite loops and adjust selection rect for differences in TextLine coordinate system
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4c7cee22 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4c7cee22 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4c7cee22 Branch: refs/heads/tlf Commit: 4c7cee22d5308ed23122c8ec9aa054d4597eeeb2 Parents: 81eceb2 Author: Alex Harui <[email protected]> Authored: Sat May 6 21:32:39 2017 -0700 Committer: Alex Harui <[email protected]> Committed: Mon May 8 11:59:01 2017 -0700 ---------------------------------------------------------------------- .../flex/org/apache/flex/textLayout/compose/TextFlowLine.as | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4c7cee22/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as index 54e7721..14c52e2 100644 --- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as +++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/TextFlowLine.as @@ -2046,7 +2046,7 @@ package org.apache.flex.textLayout.compose // this is much simpler and actually more accurate - localToGlobal/globalToLocal does some rounding rect.x += textLine.x; - rect.y += textLine.y; + rect.y += textLine.ascent; // += textLine.y; // baseline is 0 in flash.text.engine.TextLine; if (constrainShape) { @@ -2161,21 +2161,21 @@ package org.apache.flex.textLayout.compose if(_localZeroPoint == null) _localZeroPoint = new Point(0, 0); - return localZeroPoint; + return _localZeroPoint; } static private var _localOnePoint:Point; static private function get localOnePoint():Point{ if(_localOnePoint == null) _localOnePoint = new Point(1, 0); - return localOnePoint; + return _localOnePoint; } static private var _rlLocalOnePoint:Point; static private function get rlLocalOnePoint():Point{ if(_rlLocalOnePoint == null) _rlLocalOnePoint = new Point(0, 1); - return rlLocalOnePoint; + return _rlLocalOnePoint; } // TODO generalize this so we're not relying on UIBase
