adobe-photoshop / generator-assets

Generator Plug-in for Adobe Photoshop CC that helps users export image assets
MIT License
496 stars 86 forks source link

Allow layer comps to be handled with complex transform #393

Closed mcilroyc closed 8 years ago

mcilroyc commented 8 years ago

This addresses #387 and, more importantly, a general regression that prevented layer comps from being scaled by providing height/width values. I believe this was introduced by PR #374 which limited the hasComplexTransform calculation to components with layers. This current PR relaxes that slightly to allow the calculation for layers or layer comps. This ultimately allows _getSettingsWithExactBounds to be used, which handles the explicit width/height-based scaling.

iwehrman commented 8 years ago

The fix looks good on paper, it fixes some automated tests, and it seems to only revert what would seem to be an optimization of (what could be called) an edge case. So, let's do it!