Drag and drop in responsive layout


(strmiska) #1

hi!
has anyone tried the new getter/setter API for drag and drop in flexible layout?
it works in static, but i got into trouble in flexible layout.
after being dropped a rectangle should move to the top and left.
i use,

	hypeDocument.setElementProperty(element, 'left', dropZoneTop, 0.5, 'linear');
hypeDocument.setElementProperty(element, 'top', dropZoneLeft, 0.5, 'linear');

but failed.
dragDropFlexi.hype.zip (14,4 KB)


#2

Shouldn’t your elements not be grouped to let this work in responsive layout?
I did a quick test.
dragDropFlexi_2.hype.zip (15.6 KB)


(Hans-Gerd Claßen) #3

left = top
top=left

guess it’s not your aim :wink:


(strmiska) #4

yes - being grouped is a solution for the exact covering. but now try to move the drag-object.
it moves always faster than the mousecursor.


(strmiska) #5

haha. curious. thanx - this is working ungrouped. but why do i have to use the opposite?
don´t know … :astonished:


(Hans-Gerd Claßen) #6

have look back … guess it was a missmatch in your code :slight_smile:


(strmiska) #7

true - i read the wrong variable for “top”.
thanx