[OSM-dev] How to use MOD_CTRL to restrict clicks

Wyo otto.wyss at orpatec.ch
Tue Dec 21 16:17:35 GMT 2010


I've tried restrict doubleclicks to only trigger when the Ctrl key is pressed. 
I've changed the Navigation control to

    var clickOptions = {
        keyMask: OpenLayers.Handler.MOD_CTRL,
        'double': true,
        'stopDouble': true
    };
    this.handlers.click = new OpenLayers.Handler.Click(
        this, clickCallbacks, clickOptions
    );

yet that has no effect, doubleclicks without Ctrl triggers the callbacks.

Wyo




More information about the dev mailing list