Wrapping around in ListReorderer

Armin Krauss mackrauss at googlemail.com
Fri Dec 11 20:21:03 UTC 2009


Antranig,

I worked with your description on the code and it really helped me to better
understand what is
going on. I created a patch that allows to turn off the wrapping for the
listReorderer by setting
wrapDuringMove:   false
in the defaults.

It also works for the Grid and Image Reorderer. There it prevents wrapping
around if you use the
left/right arrow keys.

However, I am not sure if the Grid and Image Reorderer are what we want to
have. My biggest problem
is that the Layout Reorderer example does not work correctly any more. No
wrapping if I move up/down
in a column. I can not see how I turned that off.

Would be great if you could give me feedback on the patch.

Armin



On Thu, Dec 3, 2009 at 23:20, Antranig Basman
<Antranig.Basman at colorado.edu>wrote:

> Hi there Armin - the LayoutHandlers within the Reorderer are now
> parameterised with "parallel" and "perpendicular" "strategies" (if Colin has
> had even a thimbleful of wine this evening he is going to come after me now
> :)  which are used to compute the results of keyboard and other navigation.
> These directions are assessed relative to the "dominant" orientation
> configured into the LayoutHandler (horizontal, vertical). Around line 576
> these are mapped onto methods of the corresponding name in GeometricManager
> - the one of greatest interest to you is "that.logicalFrom" defined at line
> 464. In order to configure non-wrapped navigation, the best method would be
> to add an extra argument to "getRelativeElement" above it to defeat wrapping
> and then define a new GeometricManager strategy and label to go with it. The
> best naming would probably be to rename the existing "logicalFrom" to
> "logicalWrapFrom" by analogy to "lockedWrapFrom" below it, and call your new
> strategy "logicalFrom". This is fine since these methods have never been
> advertised as part of a public API...
>
> Sorry for the slight obscurity of implementation but it at least means that
> this work you are doing now has a clear place to take in an existing
> infrastructure of named parameterisation :P
>
> Do ask more if there are any further obscure points -
> Cheers,
> A.
>
> Armin Krauss wrote:
>
>> Hi everyone,
>>
>> I am intending to work on this JIRA
>> http://issues.fluidproject.org/browse/FLUID-3391
>>
>> The idea is to make the wrapping around in the list reorderer configurable
>> since it might
>> confuse some users (especially blind user might find it challenging to
>> move an item in a
>> list with no end).
>>
>> I tried to understand how it is done but I am lost. I did some diffs of
>> old code that fixed
>> JIRA http://issues.fluidproject.org/browse/FLUID-1491
>> which fixes the wrapping issue.
>>
>> There are not much comments in the code explaining what is going on and I
>> would be
>> happy for any help that points me in the right direction.
>>
>> I will be in tomorrow morning to work on this for 2 or 3 hours.
>>
>> Thanks for any hint.
>>
>> Armin
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________________
>> fluid-work mailing list - fluid-work at fluidproject.org
>> To unsubscribe, change settings or access archives,
>> see http://fluidproject.org/mailman/listinfo/fluid-work
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.idrc.ocad.ca/pipermail/fluid-work/attachments/20091211/0a3bbdd0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrapping_reorderer_js.patch
Type: application/octet-stream
Size: 10624 bytes
Desc: not available
URL: <https://lists.idrc.ocad.ca/pipermail/fluid-work/attachments/20091211/0a3bbdd0/attachment.obj>


More information about the fluid-work mailing list