This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Layer::createChildrenRefs | |
# Creates convenience refs on targetd layers from the design tab so that we don't have to use Layer::childrenWithName. | |
# Pass recursive=true to do this for all descendant layers while maintaining hierarchy. | |
Layer::createChildrenRefs = (recursive=false) -> | |
for layer in @children | |
# Get layer name for the key | |
key = layer.name | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ScrollPoint class | |
Events.PassedForward = "passed:forward" | |
Events.PassedBackward = "passed:backward" | |
class exports.ScrollPoint extends Framer.EventEmitter | |
constructor: (scroll, value, axis="y") -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Project Info | |
# This info is presented in a widget when you share. | |
# http://framerjs.com/docs/#info.info | |
Framer.Info = | |
title: "Triangle Layer Rebound" | |
author: "Jordan Dobson" | |
twitter: "jordandobson" | |
description: "[email protected]\n\nThis rebound of jrdn.io/haJ2 \nby Black Ray adds direction checking, allows you to set direction as an option when creating a layer and sets the bounding box of the layer to it's intrinsic size." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Layer::makeTriangle | |
# CSS Based triangles | |
# Directions: "top", "right", "bottom", "left" | |
# Credit: Black Ray https://gist.github.com/RayPS/9460d020b59fe7a201da65207bb369a0 | |
Layer::makeTriangle = (direction)-> | |
@.borderColor = "transparent" | |
@.borderWidth = @.width / 2 | |
@.style["border-#{direction}-color"] = @.backgroundColor.toHexString() | |
@.backgroundColor = "transparent" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Layer::createChildrenRefs | |
# Creates convenience refs on imported layers so that we don't have to use Layer::childrenWithName. | |
# Pass recursive=true to do this for all descendant layers while maintaining hierarchy. | |
Layer::createChildrenRefs = (recursive=false) -> | |
# Regex pattern for finding trailing numbers | |
rgx = /(\d+$)/g | |
for layer in @.children |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hello World | |
*/ | |
html{ | |
padding: 60px 80px; | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; | |
font-size: 30px; |