This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Henry Latham
Posted Jun 06 - Read on Facebook

Need a bit of help on this drag & drop prototype. I'm essentially trying to say that isDropped = true when the profile image on the right is dropped on or within 150px of the blank hexagon on the left. Not sure of the correct syntax.

The commented (#) section is the one that needs correcting:

3 Comments

Jorn van Dijk

You're close. Try: if gd.x > dt.x and gd.y > dt.y

Andreas Wahlström

Here's a snippet for situations like this: https://gist.github.com/awt2542/c63c285e14ced9773a97dabe946a12b5 Jorn van Dijk maybe there should be some basic collision detection in core?

Henry Latham

Jorn van Dijk Still not there. It needs be isDropped = true when gd.y = gd +/- 150 (i.e. not just gd.y > dt.y). See video: https://www.dropbox.com/s/gq1tcw3uedfk9vh/drag%20and%20drop.mov?dl=0

Read the entire post on Facebook