mallesh
01-13-2004, 06:11 AM
Hi Antun,
I want to resize the images (which i have uploaded on to the product).But resizing the images by draging on the small view at the left corner of the image is not functioning properly.Here is the code i used
<class name="clipartView">
<view name="v" width="90" height="90" datapath="clipdataset:/" >
<clipItem datapath="ClipArtImg" stretches="both" width="90" height="90" clickable="true" onmouseup="this.xdragger.remove(); this.ydragger.remove();" >
<method event="oninit">
this.initwidth = this.width;
this.initheight = this.height;
</method>
<method event="onmousedown">
var ydoffset = Math.round( this.getMouse('y') * this.yScale );
var xdoffset = Math.round( this.getMouse('x') * this.xScale );
this.setAttribute('ydoffset', ydoffset);
this.setAttribute('xdoffset', xdoffset);
this.xdragger.apply();
this.ydragger.apply();
//brbb.setVisible(true);
</method>
<horizDrag name="xdragger" xdmin="$once{40-this.width}" xdmax="110" />
<verticalDrag name="ydragger" ydmin="$once{10-this.height}" ydmax="220" />
<resizestate name="rs"/>
<view bgcolor="green" width="5" height="5" align="right" valign="bottom"
onmousedown="parent.rs.apply()" onmouseup="parent.rs.remove()"/>
</clipItem>
</view>
</class>
<class name="clipItem" >
<clipartimage stretches="both" width="90" height="90" datapath="ClipArt/text()" >
</clipartimage>
Actually i am using the http dataset for getting the images.
Thanks
Mallesh.
I want to resize the images (which i have uploaded on to the product).But resizing the images by draging on the small view at the left corner of the image is not functioning properly.Here is the code i used
<class name="clipartView">
<view name="v" width="90" height="90" datapath="clipdataset:/" >
<clipItem datapath="ClipArtImg" stretches="both" width="90" height="90" clickable="true" onmouseup="this.xdragger.remove(); this.ydragger.remove();" >
<method event="oninit">
this.initwidth = this.width;
this.initheight = this.height;
</method>
<method event="onmousedown">
var ydoffset = Math.round( this.getMouse('y') * this.yScale );
var xdoffset = Math.round( this.getMouse('x') * this.xScale );
this.setAttribute('ydoffset', ydoffset);
this.setAttribute('xdoffset', xdoffset);
this.xdragger.apply();
this.ydragger.apply();
//brbb.setVisible(true);
</method>
<horizDrag name="xdragger" xdmin="$once{40-this.width}" xdmax="110" />
<verticalDrag name="ydragger" ydmin="$once{10-this.height}" ydmax="220" />
<resizestate name="rs"/>
<view bgcolor="green" width="5" height="5" align="right" valign="bottom"
onmousedown="parent.rs.apply()" onmouseup="parent.rs.remove()"/>
</clipItem>
</view>
</class>
<class name="clipItem" >
<clipartimage stretches="both" width="90" height="90" datapath="ClipArt/text()" >
</clipartimage>
Actually i am using the http dataset for getting the images.
Thanks
Mallesh.