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

What is Framer? Join the Community
Return to index
Joshua Tucker
Posted Jan 02 - Read on Facebook

Far from a lean execution (I can't be quick my first few times, right? :P), but I am super stoked on this interaction.

I have some questions though on some of the code and would greatly appreciate some help! The project is available here:

1) My resorting based on where I release is not working. I have a currentArray that captures the order at start and then sets itself equal to another array that reflects the order I want when I release on said area. currentArray doesn't seem to be setting to that array and passing that into the function. Thoughts?

2) I don't remember the exact error, but Framer Studio will sometimes give me a script error "202" that is related to ')' not being in the parameter list. It doesn't necessarily hinder the usage of the prototype, but it resets placement here and there. Anyone encountered this before?


Marcelo Eduardo Oliveira

Hey Joshua, I was going to take a look at the issues, but the code you shared is a little circle menu test. Can you upload the pull to sort?

Joshua Tucker

Oh really? Oops! My bad. I have too many folders next to each other :P. Here's the updated:

Thanks for being willing to take a look!

Marcelo Eduardo Oliveira

Hey Joshua, the first thing I've noticed in a quick glance is that you're referencing the current state with Cell.states. It should be
"if Cells.states.state = "dateState""

That will trigger the sort function.

The way you did the sort(in this particular structure coming from the sketch file) is a little odd for me, so with the sort being called I will let you play around.

Joshua Tucker

Marcelo Eduardo Oliveira Haha awesome - so simple yet so powerful. Thanks for taking the time my friend. I know it is a lot of crazy code in there!

I am not well-versed enough yet to reduce some of the code, but a lot of the confusion was because I created arrays to designate order since I wasn't able to figure out how to do it well by just using the Cells array (which is what was imported from Sketch).

Read the entire post on Facebook