You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2017/04/30 12:14:33 UTC
git commit: [flex-asjs] [refs/heads/tlf] - More binary search fixes
Repository: flex-asjs
Updated Branches:
refs/heads/tlf f64f89c9e -> 3ea20315c
More binary search fixes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3ea20315
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3ea20315
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3ea20315
Branch: refs/heads/tlf
Commit: 3ea20315ccf9756bbbc54631a080e5ad12f8ab34
Parents: f64f89c
Author: Harbs <ha...@in-tools.com>
Authored: Sun Apr 30 15:14:29 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Sun Apr 30 15:14:29 2017 +0300
----------------------------------------------------------------------
.../flex/org/apache/flex/textLayout/compose/FlowComposerBase.as | 2 +-
.../flex/org/apache/flex/textLayout/elements/FlowGroupElement.as | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3ea20315/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/FlowComposerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/FlowComposerBase.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/FlowComposerBase.as
index dc4f0e1..2e29e60 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/FlowComposerBase.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/compose/FlowComposerBase.as
@@ -422,7 +422,7 @@ package org.apache.flex.textLayout.compose
var hi:int = _lines.length-1;
while (lo <= hi)
{
- var mid:int = (lo+hi)/2;
+ var mid:int = Math.floor((lo+hi)/2);
var line:ITextFlowLine = _lines[mid];
if (line.absoluteStart <= absolutePosition)
{
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3ea20315/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/elements/FlowGroupElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/elements/FlowGroupElement.as b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/elements/FlowGroupElement.as
index c600499..8664a29 100644
--- a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/elements/FlowGroupElement.as
+++ b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/elements/FlowGroupElement.as
@@ -384,7 +384,7 @@ package org.apache.flex.textLayout.elements
var hi:int = _numChildren - 1;
while (lo <= hi)
{
- var mid:int = (lo + hi) / 2;
+ var mid:int = Math.floor((lo + hi) / 2);
var child:IFlowElement = getChildAt(mid);
if (child.parentRelativeStart <= relativePosition)
{