You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/10/22 00:37:38 UTC
[46/50] git commit: [flex-sdk] [refs/heads/master] - FLEX-33779 Label
would RTE when truncating when set to multiline and there wasn't enough width
FLEX-33779 Label would RTE when truncating when set to multiline and there wasn't enough width
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/e1a65493
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/e1a65493
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/e1a65493
Branch: refs/heads/master
Commit: e1a654937e810c1688ab75eda1e3e6a654808b6e
Parents: debea17
Author: Alex Harui <ah...@apache.org>
Authored: Fri Oct 18 12:40:06 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Oct 18 12:40:06 2013 -0700
----------------------------------------------------------------------
frameworks/projects/spark/src/spark/components/Label.as | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/e1a65493/frameworks/projects/spark/src/spark/components/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/Label.as b/frameworks/projects/spark/src/spark/components/Label.as
index 087d8a9..b8d4ff3 100644
--- a/frameworks/projects/spark/src/spark/components/Label.as
+++ b/frameworks/projects/spark/src/spark/components/Label.as
@@ -1379,6 +1379,11 @@ public class Label extends TextBase
if (truncateAtCharPosition == 0)
break;
+ // sometimes the player decides there isn't enough
+ // room to render anything so bail
+ if (textLines.length == 0)
+ break;
+
// Try again by truncating at the beginning of the
// preceding atom.
var oldCharPosition:int = truncateAtCharPosition;