W3C home > Mailing lists > Public > public-houdini@w3.org > March 2016

Re: Scrolling two elements in parallel

From: Timothy Dresser <tdresser@chromium.org>
Date: Mon, 07 Mar 2016 16:03:06 +0000
Message-ID: <CAHTsfZB73rJBz73mwo6NzBsrACc3USPtadYb5q2F=cVx+GixMg@mail.gmail.com>
To: Rick Byers <rbyers@chromium.org>
Cc: Dmitry Sagalovskiy <dmitry@getgrist.com>, "public-houdini@w3.org" <public-houdini@w3.org>
You're right, compositor worker is enough here unless you need trigger
browser native scrolling logic, such as overscroll effects.

Scroll customization may be able to help with some of the edge cases though.

On Mon, Mar 7, 2016 at 10:56 AM Rick Byers <rbyers@chromium.org> wrote:

> Is scroll customization necessary here at all?  I thought this was just a
> "scroll response" effect, so all you need is compositor worker.  As such
> the use case is already listed here
> <https://github.com/w3c/css-houdini-drafts/blob/master/composited-scrolling-and-animation/UseCases.md#linked-scrollers>
> .
>
> On Mon, Mar 7, 2016 at 8:07 AM, Timothy Dresser <tdresser@chromium.org>
> wrote:
>
>> Scroll customization
>> <https://docs.google.com/document/d/1VnvAqeWFG9JFZfgG5evBqrLGDZYRE5w6G5jEDORekPY/edit?pli=1#heading=h.kd0gtwwz5bf9> on
>> compositor worker would solve this problem cleanly, though it's still quite
>> speculative.
>>
>> Feel free to submit a pull request here
>> <https://github.com/RByers/css-houdini-drafts/blob/master/css-scroll-api/UseCases.md> adding
>> this use case.
>>
>> Tim
>>
>>
>> On Mon, Mar 7, 2016 at 3:31 AM Dmitry Sagalovskiy <dmitry@getgrist.com>
>> wrote:
>>
>>> I am responding to the call for input here:
>>> https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects
>>> .
>>>
>>> One effect that I am interested in is to synchronize the scrolling of
>>> two elements. (An example is the "frozen columns" feature of spreadsheets,
>>> where two panes are in separate side-by-side containers but should scroll
>>> in parallel.)
>>>
>>> The straightforward way of listening to 'scroll' event on each
>>> container, and updating scrollTop of the other is somewhat janky with
>>> synchronous scrolling, and visibly out-of-sync with asynchronous scrolling.
>>>
>>> From reading that page and scanning some of the linked pages, I didn't
>>> find any recommendations for how to achieve a smooth parallel scroll
>>> effect. (Perhaps "Compositor worker"?) Is there anything that can be used
>>> to achieve this today?
>>>
>>> Dmitry
>>>
>>
>
Received on Monday, 7 March 2016 16:03:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 7 March 2016 16:03:50 UTC