adobe-photoshop / spaces-design

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

Translate instead of setting absolute position when swapping layers #3812

Closed mcilroyc closed 8 years ago

mcilroyc commented 8 years ago

This is a first-down hail-mary pass trying to address #3804.

I confirmed that photoshop is acting strangely when asked to set an artboard's absolute position by X/Y coords. But, while troubleshooting, I tried using the alternate method of moving layers that is used when entering X or Y coords in the Position inputs. This alternate flavor of _getMoveLayerActions uses an underlying move command instead of transform.

It seems to work fine. But I half-expect someone to remember a situation that I haven't considered which breaks it.

Note: If this alternate approach is sufficient, then it seems like one of the code paths in _getMoveLayerActions may effectively be dead now.

Bonus Bug: I also found in the existing version that the width of an artboard was sometimes slowly growing after repeated swapping.

baaygun commented 8 years ago

I think we added the alternate flavor for scrubbing, but seems like it also applies to these conditions.

I'm good with this change. :+1: