adobe-photoshop / spaces-design

Adobe Photoshop Design Space
http://adobe-photoshop.github.io/
Other
853 stars 74 forks source link

Panning AB results in brief flash of the add AB icons #2714

Open zoranagee opened 9 years ago

zoranagee commented 9 years ago

Panning quickly to the left:

screen shot 2015-09-29 at 3 50 24 pm screen shot 2015-09-29 at 3 50 34 pm screen shot 2015-09-29 at 3 50 44 pm
shaoshing commented 9 years ago

@chadrolfs I've verified the fix, but can you help double check?

chadrolfs commented 9 years ago

This issue appears to be back. Repro's intermittently on big moves. Easier to repro on small drags of AB

iwehrman commented 9 years ago

Yes, it seems to repro on move but not pan.

iwehrman commented 9 years ago

Welp, at this point we've got scroll events battling with autoCanvasShift events. Each of the former results in an attempt to re-enable the overlays, whereas the latter starts with an attempt to disable the overlays. Currently stumped on this one.

iwehrman commented 9 years ago

Giving up on this for now :person_frowning: If anyone else wants to take a crack, here's an almost comical branch which includes about 5 separate, failed attempts at hacking around the problem: https://github.com/adobe-photoshop/spaces-design/compare/iwehrman/issue-2714-again

Note that there are at least some obvious bugs fixed in that branch. For example, the debounced autoCanvasShift event handler is currently completely broken, in that for each event it creates a completely new debounced function and then calls it. Debouncing relies on successive calls of the same function, so this is no different from just calling the function after some delay.

Other problems:

  1. We know when the drag starts, so we can disable the overlays then, but we don't have a great way of knowing when the drag is complete to re-enable them.
  2. We get autoCanvasShift events throughout the drag, and we aren't exactly sure when to process them. Also, processing them by calling resetBounds automatically re-enables the overlays!
mcilroyc commented 8 years ago

FBNC to @chadrolfs

chadrolfs commented 8 years ago

CNR on Mac but still looks pretty buggy on Win

ab-adders-flash

jsbache commented 8 years ago

I see problems on OSX as well.

iwehrman commented 8 years ago

I can't repro on Mac, at least. Can somebody help me repro? I really, really want to kill this bug, and I thought my last PR would have completely eliminated any possibility of this still happening.

iwehrman commented 8 years ago

Over to @chadrolfs to help me come up with repro steps.

chadrolfs commented 8 years ago

Like I said above, CNR on Mac but maybe @jsbache can help you repro there. Otherwise try Windows.