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:
Yes this is my fault sorry. The draggable was only half done. Let me fix this.
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
I should prolly update the blog post I wrote too?
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.
Sweet! Cemre, thanks for your blogpost, it helped me getting this code working in the first place.
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.
You could just iterate over the PSD object and remove those keywords. Check out the framer.js tips post for something similar
Hadn't seen that post yet, thanks!
I would actually always just set up draggables in code like:draggable = new ui.Draggable(PSD["Some View"])