PEZ / SketchDistributor

Sketch plugin that distributes selected objects vertically or horizontally with a given spacing
MIT License
354 stars 26 forks source link

Weird distribution on artboards #14

Closed margaretgrobler closed 7 years ago

margaretgrobler commented 7 years ago

When distributing a few duplicated layers (for instance a line shape) vertically, it places them all at the right interval apart, but in a seemingly random spot off the top of the artboard. I would expect them to be placed one after the other going downward. (PS: I am a newbie to Sketch so I hope this is not an app settings issue that I'm bugging you with, but I would find this plugin extremely useful if I can get this figured out).

PEZ commented 7 years ago

@margaretgrobler: I'm not sure I follow what the problem is. Do the selection of of layers you are distributing move as a whole on distribution?

margaretgrobler commented 7 years ago

Yes @PEZ - it all jumps so that even the bottom layer out of the bunch is much higher (100px+) than where they all started. (Since they were duplicates to start out, they were all in the same spot originally - they 'jumped' up).

PEZ commented 7 years ago

@margaretgrobler: Which version of the plugin are you using? (You can see the version number under Plugins->Manage Plugins…).

margaretgrobler commented 7 years ago

1.0.3.1. I am attaching three screenshots so you can see exactly what I am doing. screen shot 2017-02-10 at 1 18 11 pm screen shot 2017-02-10 at 1 19 15 pm screen shot 2017-02-10 at 1 19 22 pm

PEZ commented 7 years ago

Thanks. I'm sort of able to reproduce it, and think that it might be a recently introduced bug. I have some investigation to do now. 😎

margaretgrobler commented 7 years ago

Ok good. Thanks for being so responsive :)

PEZ commented 7 years ago

I think I could confirm that the bug is newly introduced. It was when I thought I had fixed the problem with distributing rotated layers…

Well, we can't have the plugin as broken as that so I have just now updated with a temporary version that retracts the fix for rotated layers. Please see if it fixes the problem you found for you as well. I'll leave this issue open until I have decided/figured out what to do about the two issues.

margaretgrobler commented 7 years ago

The fix works! Thanks so much! 👍

PEZ commented 7 years ago

I changed the title of this issue, since it happens on artboards and not on a page without artboards. And, indeed, it was a result of fixing issue #10. I do hope I can find a way to close both these issues.

PEZ commented 7 years ago

@margaretgrobler: I have now updated the plugin to both behave on an artboard and handle rotated layers. Can you help me confirm that the plugin works on artboards as you would expect? You will need to update to the latest version. I would completely understand if you don't want to risk your workflow, but I ask anyway, because there are so many different situations where the plugin will be used that I need more people than myself to scrutinise.

PEZ commented 7 years ago

@margaretgrobler: never mind. The fix for #10 had several other issues that I don't think are possible to deal with so I have reverted it.

Closing this issue as fixed.

margaretgrobler commented 7 years ago

@PEZ : My apologies for not being online this weekend to help. Thanks for your hard work.