You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Mihai Chira <mi...@gmail.com> on 2014/12/16 16:45:24 UTC

Re: git commit: [flex-tlf] [refs/heads/develop] - FLEX-34649 Handle situation where textlines don't exist because they've been scrolled off-screen

Might there have been some formatting differences in terms of spaces
vs. tabs there? Or were the original Adobe files tab-formatted, and
since now we're using spaces your lines are "correct" and the others
are not?

On 12 December 2014 at 04:40,  <ah...@apache.org> wrote:
> 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 <ah...@apache.org>
> Authored: Thu Dec 11 20:36:20 2014 -0800
> Committer: Alex Harui <ah...@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;
>

Re: git commit: [flex-tlf] [refs/heads/develop] - FLEX-34649 Handle situation where textlines don't exist because they've been scrolled off-screen

Posted by Mihai Chira <mi...@gmail.com>.
> I’m not sure what you are referring to
Sorry, I was just referring to the formatting of the source code, not
to the bug itself. Because the lines you added appear to have less
whitespace at the beginning than the ones they're surrounded by. But
as I said, I assume it's because you're using spaces instead of tabs,
which is what the code standards currently suggest.

Re: git commit: [flex-tlf] [refs/heads/develop] - FLEX-34649 Handle situation where textlines don't exist because they've been scrolled off-screen

Posted by Alex Harui <ah...@adobe.com>.

On 12/16/14, 7:45 AM, "Mihai Chira" <mi...@gmail.com> wrote:

>Might there have been some formatting differences in terms of spaces
>vs. tabs there? Or were the original Adobe files tab-formatted, and
>since now we're using spaces your lines are "correct" and the others
>are not?

I’m not sure what you are referring to, but basically, we are still
working out the kinks in an attempt to workaround a player bug by guessing
at what TextBlock does.  We probably just have never hit this situation
before.

-Alex