weibeld / artboard-multi-scale Goto Github PK
View Code? Open in Web Editor NEWA Sketch plugin for scaling an Artboard to multiple dimensions at once
A Sketch plugin for scaling an Artboard to multiple dimensions at once
Currently, only the frame of a layer is scaled. However, there are other properties that also must be scaled, such as the border width, shadow, blur, font size, kerning, line height, paragraph spacing, and so on.
Most of these properties seem to be defined in a style field of the corresponding layer (e.g. a Shape or a Text).
The way to implement this is probably to check each layer if it has a style field, and, if so, go through all the properties that can be scaled, and scale them.
Currently, the frame and style of each layer are scaled. For groups, scaling the style doesn't have the desired effect because the style of a group is mostly empty (the style of each layer is defined separately in each layer). Thus, currently, when a group is scaled, its frame (and thus its shapes) are scaled correctly, but the style properties (such as border widths, font size, etc.) are not.
To correctly scale a group, each layer of a group must be scaled separately (i.e. its frame and style). Since groups can be nested, this must be implemented recursively.
Create a function that is called for each layer of the Artboard, and that:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.