PDA

View Full Version : dragstate problem


Peter_Chea
08-21-2003, 01:33 PM
Hi, I am having some problem with dragstate. I have two views, I want to do a mouse down on the first view, the second view then overlap on top of the first view. Next I will start draging the second view. However, the second is not overlaping the first view with the correct position. Any idea what is wrong.

<canvas width="400" height="400">
<view id="view1" width="50" height="50" bgcolor="red" clickable="true"/>

<view id="dragManager" x="100" y="100" width="50" height="50" bgcolor="yellow">
<dragstate name="dragger"/>
<method event="onmousedown" reference="view1">
this.setX(view1.x);
this.setY(view1.y);
this.dragger.apply();
</method>

<method event="onmouseup" reference="view1">
this.dragger.remove();
</method>
</view>
</canvas>

Peter_Chea
08-22-2003, 03:56 PM
It seem setting dragManager to be clickable solve the problem