Hi,
I'm developing a drag and drop editor (trial user at this point) and learning to use SmartClient (I'm very impressed so far).
Having an issue with my "dropped" image, though. I drag the original "thumbnail" object over my drop area, then interecept the "drop" event to create a new dropped object, which is sub-classed from Img like this:
It all works great, except the dropped image is 100 x 100 pixels square in size, not the actual image's size. I have tried forcing the DropPiece height and width, which can be used to set the dropped image size; however, what I need is the original image (as stored on disk) size.
I haven't been able to figure out why my DropPiece images want to be 100 x 100 instead of the image size stored on disk.
Any help greatly appreciated.
Thanks
Rick
I'm developing a drag and drop editor (trial user at this point) and learning to use SmartClient (I'm very impressed so far).
Having an issue with my "dropped" image, though. I drag the original "thumbnail" object over my drop area, then interecept the "drop" event to create a new dropped object, which is sub-classed from Img like this:
Code:
isc.defineClass("DropPiece", "Img").addProperties({
appImgDir: "library/",
canDragReposition:true,
canDrag:true,
canDrop:true,
dragAppearance:"target"
})
isc.defineClass("DropBox", "Canvas").addProperties({
width:800, height:500, overflow:"hidden",
edgeSize: 6,
showEdges:true,
membersMargin:5, layoutMargin:5,
canAcceptDrop:true,
animateMembers:true,
dropLineThickness:4,
drop: function () {
var dropSrc = isc.Event.getDragTarget().src;
this.addChild(isc.DropPiece.create({
src: isc.Event.getDragTarget().src,
left: this.getOffsetX()-15-this.edgeSize,
top: this.getOffsetY()-15-this.edgeSize
}))
}
I haven't been able to figure out why my DropPiece images want to be 100 x 100 instead of the image size stored on disk.
Any help greatly appreciated.
Thanks
Rick
Comment