By wongnq - 2/14/2022
Hello,
Is it possible to drag and drop multiple shapes simultaneously? For example, if we wanted two overlapped shapes (e.g. a circle and rectangle) to move together when dragging and dropping (i.e. the rectangle moves wherever the circle is dragged). Here is some of the code we've been working through:
<shape box_left> /hposition = 10% /vposition = 60% /size = (23%,45%) /color = grey /droptarget = true / dropposition = (anywhere, anywhere) </shape>
<shape box_right> /hposition = 90% /vposition = 60% /size = (23%,45%) /color = grey /droptarget = true / dropposition = (anywhere, anywhere) </shape>
<text continue> /items = ("Continue") /vposition = 95% /hposition = 90% /color = black /fontstyle = ("Heiti TC", 2%, false, false, false, false, 5, 0) </text>
<shape rectangle> /hposition = 50% /vposition = 50% / color = blue / height = 25% / dropsource = true </shape>
<shape circle> /hposition = 50% /vposition = 50% / color = yellow / shape = circle / height = 20% / dropsource = true </shape>
<expt task> /blocks = [1=test_trials] /showmousecursor = true </expt>
<block test_trials> /trials = [1-10 = trial] </block>
<trial trial> / stimulusframes = [1=continue, box_left, box_right, rectangle, circle] / inputdevice = dragdrop / droptargets = (box_left, box_right) / validresponse = (continue) </trial>
|
By Dave - 2/14/2022
+xHello, Is it possible to drag and drop multiple shapes simultaneously? For example, if we wanted two overlapped shapes (e.g. a circle and rectangle) to move together when dragging and dropping (i.e. the rectangle moves wherever the circle is dragged). Here is some of the code we've been working through: <shape box_left> /hposition = 10% /vposition = 60% /size = (23%,45%) /color = grey /droptarget = true / dropposition = (anywhere, anywhere) </shape> <shape box_right> /hposition = 90% /vposition = 60% /size = (23%,45%) /color = grey /droptarget = true / dropposition = (anywhere, anywhere) </shape> <text continue> /items = ("Continue") /vposition = 95% /hposition = 90% /color = black /fontstyle = ("Heiti TC", 2%, false, false, false, false, 5, 0) </text> <shape rectangle> /hposition = 50% /vposition = 50% / color = blue / height = 25% / dropsource = true </shape> <shape circle> /hposition = 50% /vposition = 50% / color = yellow / shape = circle / height = 20% / dropsource = true </shape> <expt task> /blocks = [1=test_trials] /showmousecursor = true </expt> <block test_trials> /trials = [1-10 = trial] </block> <trial trial> / stimulusframes = [1=continue, box_left, box_right, rectangle, circle] / inputdevice = dragdrop / droptargets = (box_left, box_right) / validresponse = (continue) </trial> > Is it possible to drag and drop multiple shapes simultaneously?
They can't be dragged simultaneously. At best, you can move the rectangle to the circle's position once the circle has been dropped.
|
|