Hi Folks,There's a lot of help on connecting or disconnecting dojo events been through most but I'm still having issues with stopping a map.graphics.clear () event bubbling over. I have tried disconnecting it in several places in the "pan" case as well as tried several approaches but it just wouldn't stop bubbling... any help welcome. cheers
function changeCursor(cursors) {
var clrGrph = dojo.connect(map, "onMouseUp", function(event) { map.graphics.clear(); event.stopPropagation(); });
//dojo.disconnect(clrGrph);
switch (cursors) {
case "pan":
dojo.disconnect(clrGrph);// not responding
alert("you"); //responds
dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/hndopen.cur'),crosshair";
down = dojo.connect(map, "onMouseDown", function(evt) {
dojo.disconnect(clrGrph);// not responding
dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/hndclosed.cur'),crosshair";
});
dojo.connect(map, "onMouseUp", function(evt) {
dojo.disconnect(clrGrph); // not responding
dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/hndopen.cur'),crosshair";
});
break;
case "extract_d":
//dojo.connect(clrGrph);
dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/extractData1.cur'),crosshair";
dojo.connect(map, "onMouseDown", function(evt) {
dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/extractData1.cur'),crosshair";
});
dojo.connect(map, "onMouseUp", function(evt) {
dojo.connect(clrGrph);
dojo.byId("Map_Panel_layers").style.cursor = "url('images/cursors/extractData1.cur'),crosshair";
});
break;
}
}