source: [view]
this.node=node;
this.surface=dojox.gfx.createSurface(node, this.size.w, this.size.h);
//this.backgroundRect=this.surface.createRect({ x:0, y:0, width:this.size.w, height:this.size.h })
// .setFill("white");
this.group=this.surface.createGroup();
this._cons=[];
var es=this.surface.getEventSource();
this._cons.push(
// kill any dragging events.
// for FF
dojo.connect(es, "ondraggesture", dojo.stopEvent),
dojo.connect(es, "ondragenter", dojo.stopEvent),
dojo.connect(es, "ondragover", dojo.stopEvent),
dojo.connect(es, "ondragexit", dojo.stopEvent),
dojo.connect(es, "ondragstart", dojo.stopEvent),
// for IE
dojo.connect(es, "onselectstart", dojo.stopEvent),
// hook up the drag system.
dojo.connect(es, 'onmousedown', this._md),
dojo.connect(es, 'onmousemove', this._mm),
dojo.connect(es, 'onmouseup', this._mu),
// misc hooks
dojo.connect(es, 'onclick', this, 'onClick'),
dojo.connect(es, 'ondblclick', this._dblclick),
dojo.connect(node, 'onkeydown', this._keydown));
this.image=this.group.createImage({ width:this.imageSize.w, height:this.imageSize.h, src:this.imageSrc });