You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/08/21 09:11:57 UTC
[02/28] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] -
change coordinate space to something expected but different from the way
Flash textLine works
change coordinate space to something expected but different from the way Flash textLine works
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/367f8b97
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/367f8b97
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/367f8b97
Branch: refs/heads/feature/dragAndDrop
Commit: 367f8b9793641cbc43d88c4bb8184d136b5a3d09
Parents: 3bb3f41
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 8 10:00:20 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 8 10:01:16 2017 -0700
----------------------------------------------------------------------
.../Text/src/main/flex/org/apache/flex/text/html/TextLine.as | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/367f8b97/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
index 440ae30..c260c0c 100644
--- a/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
+++ b/frameworks/projects/Text/src/main/flex/org/apache/flex/text/html/TextLine.as
@@ -356,7 +356,7 @@ package org.apache.flex.text.html
if (atomIndex == element.firstChild.textContent.length - 1)
{
w = (element.firstChild as HTMLElement).getClientRects()[0].width;
- return new Rectangle(w, 1.2 - _textBlock.content.elementFormat.fontSize, 3, 1.2);
+ return new Rectangle(w, 1.2, 3, 1.2 + _textBlock.content.elementFormat.fontSize);
}
else
{
@@ -372,7 +372,7 @@ package org.apache.flex.text.html
span.innerHTML = s.substring(0, atomIndex + 1);
w = span.getClientRects()[0].width;
element.removeChild(span);
- return new Rectangle(w1, 1.2 - _textBlock.content.elementFormat.fontSize, w - w1, 1.2);
+ return new Rectangle(w1, 1.2, w - w1, 1.2 + _textBlock.content.elementFormat.fontSize);
}
}
}