Repository: flex-asjs
Updated Branches:
  refs/heads/tlf 495cc0cd7 -> 3b3097de4


Fixed some cases of measuring lines. Might have broken others…


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3b3097de
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3b3097de
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3b3097de

Branch: refs/heads/tlf
Commit: 3b3097de4d6bc45282de7bc5f6854b245c2f0aeb
Parents: 495cc0c
Author: Harbs <[email protected]>
Authored: Wed May 3 13:32:08 2017 +0300
Committer: Harbs <[email protected]>
Committed: Wed May 3 13:32:08 2017 +0300

----------------------------------------------------------------------
 .../textLayout/container/ContainerController.as | 36 ++++++++++++--------
 1 file changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3b3097de/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
 
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
index 6cc0841..80e1332 100644
--- 
a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
+++ 
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/container/ContainerController.as
@@ -4858,21 +4858,27 @@ package org.apache.flex.textLayout.container
                                if (!textLine)
                                        textLine = 
textFlowLine.getTextLine(true);
                                textFlowLine.createShape(wmode, textLine);
-                               if (textLine.numElements == 0)
-                               {
-                                       // Get it the new way
-                                       if (wmode == BlockProgression.TB)
-                                               
textFlowLine.cacheLineBounds(wmode, textLine.x, textLine.y - textLine.ascent, 
textLine.textWidth, textLine.textHeight);
-                                       else
-                                               
textFlowLine.cacheLineBounds(wmode, textLine.x - textLine.descent, textLine.y, 
textLine.textHeight, textLine.textWidth);
-                               }
-                               else    // Phase this out after composition is 
updated to handle inline case correctly
-                               {
-                                       var lineBounds:Rectangle = 
getPlacedTextLineBounds(textLine);
-                                       if (textLine.hasGraphicElement)
-                                               lineBounds = 
computeLineBoundsWithGraphics(textFlowLine, textLine, lineBounds);         
-                                       textFlowLine.cacheLineBounds(wmode, 
lineBounds.x, lineBounds.y, lineBounds.width, lineBounds.height);
-                               }
+//TODO I'm not sure what all these calculations are for. We're doing it the 
simple way for now.
+                               if (wmode == BlockProgression.TB)
+                                       textFlowLine.cacheLineBounds(wmode, 
textLine.x, textLine.y - textLine.ascent, textLine.textWidth, 
textLine.textHeight);
+                               else
+                                       textFlowLine.cacheLineBounds(wmode, 
textLine.x - textLine.descent, textLine.y, textLine.textHeight, 
textLine.textWidth);
+
+                               // if (textLine.numElements == 0)
+                               // {
+                               //      // Get it the new way
+                               //      if (wmode == BlockProgression.TB)
+                               //              
textFlowLine.cacheLineBounds(wmode, textLine.x, textLine.y - textLine.ascent, 
textLine.textWidth, textLine.textHeight);
+                               //      else
+                               //              
textFlowLine.cacheLineBounds(wmode, textLine.x - textLine.descent, textLine.y, 
textLine.textHeight, textLine.textWidth);
+                               // }
+                               // else // Phase this out after composition is 
updated to handle inline case correctly
+                               // {
+                               //      var lineBounds:Rectangle = 
getPlacedTextLineBounds(textLine);
+                               //      if (textLine.hasGraphicElement)
+                               //              lineBounds = 
computeLineBoundsWithGraphics(textFlowLine, textLine, lineBounds);         
+                               //      textFlowLine.cacheLineBounds(wmode, 
lineBounds.x, lineBounds.y, lineBounds.width, lineBounds.height);
+                               // }
                        }
                        var rslt:* = (wmode == BlockProgression.TB ? 
_measureHeight : _measureWidth) ? 0 : textFlowLine.testLineVisible(wmode, 
scrollXTW, scrollYTW, scrollWidthTW, scrollHeightTW);
                        return (rslt == 0) ? (textLine ? textLine : 
textFlowLine.getTextLine(true)) : rslt;

Reply via email to