thipperudra
12-03-2003, 11:43 PM
Hi Antun,
<canvas>
<view bgcolor="green" width="100" height="100" onmousedown="draggable.apply();" onmouseup="draggable.remove();" >
<resizestate name="rs"/>
<dragstate name="draggable"/>
<view align="right" valign="bottom"
width="5" height="5" bgcolor="blue"
onmousedown="parent.rs.apply();"
onmouseup="parent.rs.remove()" />
<view align="left" valign="top"
width="5" height="5" bgcolor="blue"
onmousedown="parent.rs.apply();"
onmouseup="parent.rs.remove()" />
</view>
</canvas>
In the above code , when i move the mouse position on the bottom right corner of the blue (view) point, i can change the width and height resize by moving the mouse on x and y direction.
But i have problem when i using at the top left corner of blue view,i want to resize the parent view when i move from this in upward (negative y-axis) the parent view height should increases and if i move from this left side (negative x-axis) the parent view width should increases in same direction.And also if i move positive x and y directions the size(width and height) of the parent view should decreases (means exact opposite function of bottom right corner mouse(blue view) position).
How do i do this from above code.
Thanks,
-Rudresh
<canvas>
<view bgcolor="green" width="100" height="100" onmousedown="draggable.apply();" onmouseup="draggable.remove();" >
<resizestate name="rs"/>
<dragstate name="draggable"/>
<view align="right" valign="bottom"
width="5" height="5" bgcolor="blue"
onmousedown="parent.rs.apply();"
onmouseup="parent.rs.remove()" />
<view align="left" valign="top"
width="5" height="5" bgcolor="blue"
onmousedown="parent.rs.apply();"
onmouseup="parent.rs.remove()" />
</view>
</canvas>
In the above code , when i move the mouse position on the bottom right corner of the blue (view) point, i can change the width and height resize by moving the mouse on x and y direction.
But i have problem when i using at the top left corner of blue view,i want to resize the parent view when i move from this in upward (negative y-axis) the parent view height should increases and if i move from this left side (negative x-axis) the parent view width should increases in same direction.And also if i move positive x and y directions the size(width and height) of the parent view should decreases (means exact opposite function of bottom right corner mouse(blue view) position).
How do i do this from above code.
Thanks,
-Rudresh