adobe-photoshop / spaces-design

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

Reset bounds of layers that moved during swap, as canvas shift can happen #3686

Closed baaygun closed 8 years ago

baaygun commented 8 years ago

Addresses #3505

We set autoExpandDisabled during our action play, but as soon as we finish and re-set it, PS handles canvas shift, and sends us the event, which we debounce. Because we debounce it, if we were to call swap again, we would be trying to swap layers at a wrong location, and cause the bug. So now as part of swap, we call resetBounds on all selected layers. This doesn't add that much to action time, so didn't seem like a bad performance hit.

iwehrman commented 8 years ago

One question, but looks good generally. Back to @volfied.

iwehrman commented 8 years ago

You know, I wonder if we could filter out non-artboard group layers in resetBounds as an optimization since we don't track bounds for plain groups anyway.

iwehrman commented 8 years ago

(Work in progress on that here: https://github.com/adobe-photoshop/spaces-design/compare/iwehrman/reset-fewer-bounds)

baaygun commented 8 years ago

@iwehrman Answered your question, I think the change is safe.

iwehrman commented 8 years ago

:+1: :+1: :+1: