fuggfuggfugg / sketch-dynamic-button-3.5

Up-to-date version of the original Dynamic button for Sketch.app.
MIT License
229 stars 13 forks source link

'Improvement' of applying to only text layers reduces functionality #17

Closed sweetyams closed 8 years ago

sweetyams commented 8 years ago

The recent switch to only affect text layers us a really big change and affects a lot of cases that we were using the plugin for. We consistently use the plugin to setup margin and padding with groups of elements so for it to only apply to text elements cause a lot of problems.

is it possible to revert this change to allow the plugin to apply to more than just text layers?

fuggfuggfugg commented 8 years ago

Also pinging @mikeprecious

@sweetyams, Apologies mate. I'll revert this tonight.

If you want to fix this temporarily, Navigate to the plugin folder and open the plugin in any editor.

https://github.com/fuggfuggfugg/sketch-dynamic-button-3.5/blob/master/DynamicButton3.5.sketchplugin/Contents/Sketch/script.cocoascript#L98

And you can replace the if condition from

if( [currentLayer class] == MSTextLayer ){ to if( 1 == 1 ){

and save the file.

This should fix it for now. I'll update the repo tonight.

fuggfuggfugg commented 8 years ago

@sweetyams @mikeprecious

I've removed the check and updated. You can download & reinstall the plugin.

Thanks for the feedback.

sweetyams commented 8 years ago

Thanks! this is amazing.

Thank you for jumping on this so quickly