[OpenLayers-Dev] getting keyboard status in featureAdded

Peter Körner osm-lists at mazdermind.de
Thu Jul 1 16:56:21 EDT 2010


Am 01.07.2010 21:14, schrieb Tim Schaub:
>
> The DrawFeature control's featureAdded callback will not help out here.
>
In the end I just overwrote the Handler's mousedown to store the event 
object:

// modify the handler so that the event is saved
OpenLayers.Handler.Point.prototype.mouseup_ov =
   OpenLayers.Handler.Point.prototype.mouseup;

OpenLayers.Handler.Point.prototype.mouseup = function(evt) {
   if(evt) window.event = evt;
   OpenLayers.Handler.Point.prototype.mouseup_ov.apply(this, arguments);
}

Thank you for your help.

Peter



More information about the Dev mailing list