drag-and-drop.lzx
<canvas layout="spacing: 10">
<text multiline="true" width="300">The following view uses the
<i>dragging</i> library.</text>
<view resource="../images/laszlo_explorer_logo.png" onmousedown="dragging.setAttribute('applied', true)" onmouseup="dragging.setAttribute('applied', false); stop()">
<dragstate name="dragging"/>
</view>
<text multiline="true" width="100%">Implement custom dragging
behaviors by subclassing <i>dragstate</i>, or with states and
constraints.</text>
<view resource="../images/laszlo_explorer_logo.png" onmousedown="dragging.setAttribute('applied', true)" onmouseup="dragging.setAttribute('applied', false)">
<state name="dragging">
<attribute name="x" value="${parent.getMouse('x')}"/>
</state>
</view>
</canvas>
Cross References