On Fri, Nov 21, 2008 at 10:23 PM, Alexandre Dube <[EMAIL PROTECTED]> wrote:
> I'm been scratching my head for a while on this : how can I add select a
> feature using this customized control on click + ctrl key down only ?
> I've tried to add a keyMask but the checkModifiers never seems to trigger.
Handler.Feature just has no keyMask support. Take a look at the
attached patch (untested!).
Cheers,
--
Eric
Index: lib/OpenLayers/Handler/Feature.js
===================================================================
--- lib/OpenLayers/Handler/Feature.js (revision 8407)
+++ lib/OpenLayers/Handler/Feature.js (working copy)
@@ -231,7 +231,7 @@
// out of last feature and in to another
this.triggerCallback(type, 'out', [this.lastFeature]);
this.triggerCallback(type, 'in', [this.feature]);
- } else if(!previouslyIn || click) {
+ } else if(!previouslyIn || (click && this.checkModifiers(evt))) {
// in feature for the first time
this.triggerCallback(type, 'in', [this.feature]);
}
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users