This file contains 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 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: "jordandobson@gmail.com\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." |