Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshmtucker/ScaleFrame
Module for Framer Studio to calculate properties of a scaled layer using its new dimensions.
https://github.com/joshmtucker/ScaleFrame
Last synced: about 2 months ago
JSON representation
Module for Framer Studio to calculate properties of a scaled layer using its new dimensions.
- Host: GitHub
- URL: https://github.com/joshmtucker/ScaleFrame
- Owner: joshmtucker
- Created: 2015-03-29T04:39:01.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-29T05:45:44.000Z (almost 10 years ago)
- Last Synced: 2024-08-04T00:10:16.906Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 543 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-framer - ScaleFrame - Module for Framer to calculate properties of a scaled layer using its new dimensions. (Modules)
README
# ScaleFrame
![](https://cloud.githubusercontent.com/assets/6194928/6884244/aa36f0e0-d59b-11e4-99f4-fb2526fef15e.png)
Calculate the properties of a scaled layer using its new dimensions. Since scaling a layer only changes it visually, not physically by its actual property dimensions, this is a great tool!# Usage
Put the scaleFrame.coffee file in the /modules folder inside your Framer project. To include in Framer Studio, put the following code at the top of your project:
```coffee
variableName = require "scaleFrame"
```
## Calculate Values
Using the line of code below, pass in your scaled layer and specify true or false.
```coffee
###TRUE means you want absolute property values (see layer.screenFrame for documentation)
FALSE means you want default property values (relative to superLayer/parent layer if applicable)###
variableName.scaleFrame(scaledLayer, true)
```
## Properties
Below are the full list of properties that are returned.> variableName.scaleFrame(scaledLayer, true).
> - x
> - y
> - minX
> - minY
> - midX
> - midY
> - maxX
> - maxY
> - width
> - height# Example
Download scaleFrame.framer to see how this module works.