Open redgriffith opened 3 years ago
Hi @redgriffith
Did you see this example?
const observable = subjx.createObservable();
subjx('.draggable').drag({...}, observable);
const createDraggableAndSubscribe = e => {
subjx(e.target).drag({...}, observable);
};
You should use external observable
instance if you want to add new element.
Hello Thanks for you reply, i think it's what i searched for
Nevertheless i tried combinations on your example fiddle but don't succeed with yellow rectangle ?
i don't understand how to use it correctly ^^;
thanks
Hello,
I see that we can mimic move with this option each: { move: true, }
the problem is that it seems to work only with existing elements. -> When i add a new element on the scene and move it, mimic with others existing elements not working. We saw it on your example with thoses two yellow rectangle http://jsfiddle.net/nichollascarter/qgwzch0v/
My idea is to create a function like this -> if i move a draggable element (i can know that with your onmove function) then move all elements with class ".draggable" which have also specific class (for example ".mimic").
Add and remove the .mimic class will be easier for me, i can do it. ...But my real problem is how can i use your code in subjx.dev to call a mimic function ??
Thanks in advance !