GitXplorerGitXplorer
m

framer-constrainToCircle

public
14 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
08989e0163a9b27ef6cd68063d5f4da9f4beab53

Revert "fixed helper.index, again"

committed 9 years ago
Unverified
0151bfb4d94bb28749b31e9fa3f32c682a6e6d72

Revert "code clean-up, "switch-case" instead of "if", proper fallback, various fixes, added additional curves"

committed 9 years ago
Unverified
c491b97cd5cbf83cbf991bcfdece69156c068b8c

code clean-up, "switch-case" instead of "if", proper fallback, various fixes, added additional curves

committed 9 years ago
Unverified
8ee1f07c38f7f9ec739b12102cfc14d94320a41a

Revert "initial release"

committed 9 years ago
Unverified
d7ca5363086cfdefc15220fddf1f0b722031811f

initial release

committed 9 years ago
Unverified
e3d1140cf05691e17a63e438e26399e2004fbb19

fixed helper.index, again

committed 9 years ago

README

The README file for this repository.

framer-constrainToCircle

‚constrainToCircle‘ is a module that enables dragging for a layer and constrains its movement to a circle.

Demo

gif

Live Demo: http://share.framerjs.com/z37yx6kb4mb7/

Getting started

# Copy ‚constrainToCircle.coffee’ into your project’s ‚modules‘-folder

# Include module
constrainToCircle = require „constrainToCircle“

# enables dragging for ‚layer‘ and constrains its movement to a circle
constrainToCircle.enable(layer,circleCenterX,circleCenterY,radius)

# updates an existing constrainToCircle-layer
constrainToCircle.update(layer,circleCenterX,circleCenterY,radius)

# disables dragging for ‚layer‘
constrainToCircle.disable(layer)

# variables: values from the invisible ‚helper’-layer
constrainToCircle.isDragging # returns true/false
constrainToCircle.velocityX # returns float
constrainToCircle.velocityY # returns float
constrainToCircle.helper # returns ‚helper‘-layer