flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-tlf] [refs/heads/develop] - FLEX-34649 Handle situation where textlines don't exist because they've been scrolled off-screen
Date Fri, 12 Dec 2014 04:40:42 GMT
Repository: flex-tlf
Updated Branches:
  refs/heads/develop 446d1a03e -> 9280a37b9


FLEX-34649 Handle situation where textlines don't exist because they've been scrolled off-screen


Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/9280a37b
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/9280a37b
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/9280a37b

Branch: refs/heads/develop
Commit: 9280a37b9d26bc3f957c0801661793422b0b9a2b
Parents: 446d1a0
Author: Alex Harui <aharui@apache.org>
Authored: Thu Dec 11 20:36:20 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Dec 11 20:36:20 2014 -0800

----------------------------------------------------------------------
 .../src/flashx/textLayout/elements/ParagraphElement.as       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/9280a37b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
index 5db84d0..2e8cd33 100644
--- a/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
+++ b/textLayout/src/flashx/textLayout/elements/ParagraphElement.as
@@ -801,9 +801,9 @@ package flashx.textLayout.elements
 			var tb:TextBlock = getTextBlockAtPosition(relativePosition);
 			var tbStart:int = getTextBlockStart(tb);
 			var textBlockPos:int = relativePosition - tbStart;
-			if (ContainerController.tlf_internal::usesDiscretionaryHyphens)
+            var tl:TextLine = tb.getTextLineAtCharIndex(textBlockPos);
+			if (ContainerController.tlf_internal::usesDiscretionaryHyphens && tl != null)
 			{
-				var tl:TextLine = tb.getTextLineAtCharIndex(textBlockPos);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(textBlockPos);
                 //trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
                 var isRTL:Boolean = tl.getAtomBidiLevel(currentAtomIndex) == 1;
@@ -895,9 +895,9 @@ package flashx.textLayout.elements
 			var tb:TextBlock = getTextBlockAtPosition(relativePosition);
 			var tbStart:int = getTextBlockStart(tb);
 			var textBlockPos:int = relativePosition - tbStart;
-			if (ContainerController.tlf_internal::usesDiscretionaryHyphens)
+            var tl:TextLine = tb.getTextLineAtCharIndex(textBlockPos);
+			if (ContainerController.tlf_internal::usesDiscretionaryHyphens && tl != null)
 			{
-				var tl:TextLine = tb.getTextLineAtCharIndex(textBlockPos);
 				var currentAtomIndex:int = tl.getAtomIndexAtCharIndex(textBlockPos);
                 //trace("relpos", relativePosition, "atomIndex", currentAtomIndex);
                 var isRTL:Boolean = tl.getAtomBidiLevel(currentAtomIndex) == 1;


Mime
View raw message