Hi all, i'm searching for very simple Framer exemples with conditionals (if else if else). Any idea ? :)
What about you come up with a very simple example that you'd like to see and I'll make it for you :-)
For exemple: i want to drag a square and when i dragEnd i want to change the square's color :) # Set backgroundbg = new BackgroundLayer backgroundColor: "#28affa"
# Create layerlayerA = new Layer width: 250 height: 250 backgroundColor: "#fff" borderRadius: 8
# Enable dragginglayerA.draggable.enabled = true
layerA.on Events.Drag, -> if layerA.onDragEnd == true backgroundColor: "#000"
But you don't need conditionals for this though :-)
Thanks ! it works;) but I also want to know how to work with conditionals.
For exemple, i drag a square and i want to put it on another then something happen :)
Homework: make it work only if layerA is _entirely_ is in layerB. Hint: you need to check 4 points rather then one.
Thanks Koen Bok