Add a behavior to set the documentDrag option[1] to
OpenLayers.Control.Navigation, without this setting dragging the map
stops whenever another element is intercepted with the mouse.

A patch is on its way.

[1] http://dev.openlayers.org/docs/files/OpenLayers/Control/Navigation-js.ht...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ao2’s picture

Status: Active » Needs review
Issue tags: ++patch
FileSize
2.99 KB

Patch attached.

I had to cast the setting to Boolean():

...
+        'documentDrag': Boolean(data.map.behaviors['openlayers_behavior_navigation'].documentDrag),
...

otherwise OpenLayers wouldn't get it with the '1', is this a Javascript thing? If so other settings might need to be adjusted.

Thanks,
Antonio

zzolo’s picture

Status: Needs review » Closed (fixed)
ao2’s picture

@zzolo thanks for merging it. Any comment on the Boolean() thing?

Just as a side note: take care when you commit, take always a look at the git history before you push, I noticed I don't show up as the author of the change in http://drupalcode.org/project/openlayers.git/commitdiff/42f2d5f and attribution is very important IMHO, yes there is the "by ao2" but I consider it just a workaround. And no, you don't need to do anything to fix that this time, but for the future please consider using the git "Author field" ;) for what it is for, git format-patch/git am make it so easy to get it right that there are no technical excuses for not giving proper attribution. :)

Take care and thanks again for the great module,
Antonio