I've got a layer with the y:500 property and I've made it draggable. But when you drag, I don't want it to be dragged higher than 500.
Is there a minimal and max x/y position you can drag a layer to, and how do you specify this ?
Keep up the good work !
Hey Alex Lingeman, you can do this by using a simple if-statement. If the y-value of the layer is bigger than 500, then make the layer undraggable & change the y-value to the max range (500 in this case). Hope this helps!
Even though I'd strongly(!) recommend doing it the way Nils explained above, there's an undocumented function called "layer.maxDragFrame" which allows you to set hard boundaries for draggable layers. However, I'm not 100% sure if this function is still ... well, functioning.
Example: http://examples.framerjs.com/#draggable-swipe.framerBlog post: http://framerjs.tumblr.com/post/93327177827/draggable-swipe-by-benjamin-nathan-people-often
Thank you Nils Hoenson and Marc Krenn for your solutions. I've implemented Nils's solution, and it seems to work just fine !
Also, the final result. The new scroll features came a few days later, so i'm going to fit that in soon :) https://dribbble.com/shots/2003566-NGC-Interactive-Article-preview?list=users&offset=0