flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-tlf] [refs/heads/develop] - FLEX-34769
Date Wed, 09 Dec 2015 22:35:44 GMT
Repository: flex-tlf
Updated Branches:
  refs/heads/develop c31ddf71b -> 96407e259


FLEX-34769


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

Branch: refs/heads/develop
Commit: 96407e2592524a279761a2435c81bb98cf38adc2
Parents: c31ddf7
Author: Harbs <harbs@in-tools.com>
Authored: Thu Dec 10 00:35:39 2015 +0200
Committer: Harbs <harbs@in-tools.com>
Committed: Thu Dec 10 00:35:39 2015 +0200

----------------------------------------------------------------------
 .../src/flashx/textLayout/compose/BaseCompose.as     | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/96407e25/textLayout/src/flashx/textLayout/compose/BaseCompose.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/compose/BaseCompose.as b/textLayout/src/flashx/textLayout/compose/BaseCompose.as
index 3ed8352..7e8ef33 100644
--- a/textLayout/src/flashx/textLayout/compose/BaseCompose.as
+++ b/textLayout/src/flashx/textLayout/compose/BaseCompose.as
@@ -722,9 +722,6 @@ package flashx.textLayout.compose
 			
 			resetControllerBounds();
 			
-			// Bug, needs to remove 
-			_startComposePosition = _startController.absoluteStart;
-			
 			// This is where we will start composing from
 			_curElement = _textFlow.findLeaf(_startComposePosition);
 			_curElementStart = _curElement.getAbsoluteStart();
@@ -813,7 +810,7 @@ package flashx.textLayout.compose
 			var curLine:TextFlowLine = _flowComposer.getLineAt(startLineIndex);
 			
 			// cannot start in the middle if we are measuring AND there are floats
-			if (curLine.controller.numFloats)
+			if (curLine.controller && curLine.controller.numFloats)
 			{
 				CONFIG::debug { assert((_blockProgression == BlockProgression.TB && curLine.controller.measureWidth

 					|| _blockProgression == BlockProgression.RL && curLine.controller.measureHeight)
== _measuring,"Bad _measuring intialization"); }
@@ -1021,7 +1018,11 @@ package flashx.textLayout.compose
 			// We could examine the earlier part of the paragraph to see if its visible, but for now
just assume it
 			// might be.
 			_paragraphContainsVisibleLines = (_curElementStart + _curElementOffset != _curParaStart)
;
-			
+			if(_paragraphContainsVisibleLines)
+			{
+				//we're composing in midddle of a paragraph. Update the line start to match up with our
current location
+				_curLineStart = _curElementStart + _curElementOffset;
+			}
 			var success:Boolean = composeParagraphElementIntoLines();
 			
 			var okToRelease:Boolean = true;
@@ -1087,7 +1088,9 @@ package flashx.textLayout.compose
 		protected function composeParagraphElementIntoLines():Boolean
 		{
 			// make sure TextBlocks are normalized
-			_curParaElement.createContentElement();
+			if(_curParaElement.getTextBlock().content == null)
+				_curParaElement.createContentElement();
+			
 			var result:Boolean = true;
 			var textLine:TextLine;
 			


Mime
View raw message