DWilliames / paddy-sketch-plugin

Automated padding, spacing and alignment for your Sketch layers
MIT License
2.17k stars 61 forks source link

Padding for selection obeys masked items sizes, it shouldn't #111

Open highvoltaged opened 6 years ago

highvoltaged commented 6 years ago

Padding for selection obeys masked items sizes, it shouldn't

Bug report

If a group contains a masked element, that is larger than the mask, the padding obeys the masked item size, instead of the mask size.

Expected behavior:

Masked items should always be padded to the mask size.

Steps to reproduce:

Mask a bigger rectangle with a smaller one. Add padding. Padding is calculated for the bigger masked rectangle. If you move around the masked rectangle, you can clearly see.

Thanks Matt

Raghav789 commented 6 years ago

humm I think grouping the mask and the bigger layer would fix this or adding '-prefix to the bigger layer would work also

kium-one commented 6 years ago

Grouping the mask doesn't work unfortunately, and the - prefix defeats the purpose. At the root level I have a group element of a certain size, in which there are many masks and masked layers (larger than the group). At the root level I also have a rectangle that should be the same size as the group. Because the group contains large masked layers, the rectangle is much larger than the group.

Raghav789 commented 6 years ago

can you share your sketch file with this particular group? I've exact same setup that you mentioned in Steps to reproduce in one of my projects and it's working fine with - Prefix

kium-one commented 6 years ago

The issue is that I DO want the plugin to resize to that group (the - ignores it), but not to the size of masked objects. Unless you’re suggesting I should put the - on all the masked layers (within the group)?

On May 26, 2018, at 2:20 AM, Raghav notifications@github.com wrote:

can you share your sketch file with this particular group? I've exact same setup that you mentioned in Steps to reproduce in one of my projects and it's working fine with - Prefix

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DWilliames/paddy-sketch-plugin/issues/111#issuecomment-392249134, or mute the thread https://github.com/notifications/unsubscribe-auth/AL_cEiGBC4hKBkq1Z6xR6ddNeIEUFk5jks5t2R5WgaJpZM4T4AuL.

careylin commented 6 years ago

@najiglass I encountered this same problem just now. I tried out the - prefix on each masked layer that was problematic and it worked. If that solution doesn't work for you there may be a different bug, because the prefix works, for me, at least.

jcenlo commented 6 years ago

Same problem