Small change to getting selection rects

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

Branch: refs/heads/develop
Commit: 537c35259306c87abb74ad073cab270ecc5b2f12
Parents: 3d51c48
Author: Harbs <ha...@in-tools.com>
Authored: Wed Oct 8 11:50:19 2014 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Oct 8 11:50:19 2014 +0300

----------------------------------------------------------------------
 textLayout/src/flashx/textLayout/compose/TextFlowLine.as     | 5 +++--
 .../src/flashx/textLayout/compose/TextFlowTableBlock.as      | 8 ++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/537c3525/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as 
b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
index 0ff278f..bd6e015 100644
--- a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
+++ b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
@@ -1386,7 +1386,9 @@ package flashx.textLayout.compose
                        
                        // 8-31-14 Do we need to adjust this for paras with 
multiple textBlocks? 
                        //get the absolute start of the paragraph.  Calculation 
is expensive, so just do this once.
-                       var paraAbsStart:int = _para.getAbsoluteStart();
+                       //var paraAbsStart:int = _para.getAbsoluteStart();
+                       var textLine:TextLine = getTextLine();
+                       var paraAbsStart:int = 
_para.getTextBlockAbsoluteStart(textLine.textBlock);
                        
                        //if the indexes are identical and are equal to the 
start of the line, then
                        //don't draw anything.  This prevents a bar being drawn 
on a following line when
@@ -1420,7 +1422,6 @@ package flashx.textLayout.compose
                        selectionCache.begIdx = begIdx;
                        selectionCache.endIdx = endIdx;
                        
-                       var textLine:TextLine = getTextLine();
                        var heightAndAdj:Array = 
getRomanSelectionHeightAndVerticalAdjustment(prevLine, nextLine);
                        calculateSelectionBounds(textLine, drawRects, begIdx, 
endIdx, blockProgression, heightAndAdj);
                        

http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/537c3525/textLayout/src/flashx/textLayout/compose/TextFlowTableBlock.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/compose/TextFlowTableBlock.as 
b/textLayout/src/flashx/textLayout/compose/TextFlowTableBlock.as
index b5e3329..b37c804 100644
--- a/textLayout/src/flashx/textLayout/compose/TextFlowTableBlock.as
+++ b/textLayout/src/flashx/textLayout/compose/TextFlowTableBlock.as
@@ -1,9 +1,12 @@
 package flashx.textLayout.compose
 {
        
+       import flash.display.DisplayObject;
+       import flash.display.Shape;
        import flash.text.engine.TextLine;
        
        import flashx.textLayout.container.ContainerController;
+       import flashx.textLayout.edit.SelectionFormat;
        import flashx.textLayout.elements.CellContainer;
        import flashx.textLayout.elements.CellCoordinates;
        import flashx.textLayout.elements.ParagraphElement;
@@ -210,6 +213,11 @@ package flashx.textLayout.compose
                {
                        return _textHeight;
                }
+               
+               tlf_internal override function 
hiliteBlockSelection(selObj:Shape, selFormat:SelectionFormat, 
container:DisplayObject, begIdx:int, endIdx:int, prevLine:TextFlowLine, 
nextLine:TextFlowLine):void
+               {
+                       // do nothing for now...
+               }
 
        }
 }
\ No newline at end of file

Reply via email to