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

What is Framer? Join the Community
Return to index
Floris Verloop
Posted Oct 17 - Read on Facebook

Hey guys,

Quick question. When I have a draggable view, why is it that I can put the 'DragMove' event directly on the view, but I have to put 'DragEnd' on the 'draggable' object?

Here's my code for some context:

11 Comments

Koen Bok

Yes this is my fault sorry. The draggable was only half done. Let me fix this.

Floris Verloop

Great, thanks!

Koen Bok

Ok fixed. Just download the latest framer.js from github and replace the one in your product. Here is some example code: https://gist.github.com/koenbok/7023725

Cemre Güngör

I should prolly update the blog post I wrote too?

Cemre Güngör

Woo, thanks

Koen Bok

The whole draggable = new Draggable(view) thing is also not very pretty. But I want to keep them separate for a bit until dragging works perfect. Then I can maybe make it like myView.draggable = True/False.

Floris Verloop

Sweet! Cemre, thanks for your blogpost, it helped me getting this code working in the first place.

Floris Verloop

I've added the word draggable in the layer name in PS. Would be nice if I could do something like 'layername (draggable)' and the view Framer creates will be named just layername, without the (draggable) part.

Cemre Güngör

You could just iterate over the PSD object and remove those keywords. Check out the framer.js tips post for something similar

Floris Verloop

Hadn't seen that post yet, thanks!

Koen Bok

I would actually always just set up draggables in code like:
draggable = new ui.Draggable(PSD["Some View"])

Read the entire post on Facebook