Giter VIP home page Giter VIP logo

artboard-multi-scale's People

Contributors

weibeld avatar

Stargazers

 avatar

Watchers

 avatar  avatar

artboard-multi-scale's Issues

Implement scaling of additional properties, such as border width, shadows, font size, etc.

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.

Implement scaling of groups

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:

  • If the layer is not a group, scales the frame and style of this layer
  • If the layer is a group, calls itself for each layer of the group

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.