OpenLayers OpenLayers

Ticket #1359 (new feature)

Opened 5 months ago

Last modified 2 months ago

HOWTO: Enable zoom out with right-dblclick

Reported by: openlayers Assigned to: euzuro
Priority: minor Milestone: 2.7 Release
Component: Events Version: 2.5
Keywords: right dblclick double click mouse Cc:
State: Review

Description

This would be handy for users familiar with Google Maps.

I looked for a way to do it but could not get anything to work.

Wanted for http://wheresthepath.googlepages.com/wheresthepath.htm which uses OS OpenSpace.

Bill Chadwick

Attachments

RightMouse.patch (5.6 kB) - added by openlayers on 04/03/08 02:01:44.
RightMouseV2.patch (5.6 kB) - added by itbeyond on 05/27/08 01:29:08.
This version corrects the return missing for the event generated in the Click.js

Change History

02/27/08 14:49:17 changed by euzuro

  • milestone set to 2.7 Release.

interesting. did not know about this, but seems like a good idea

04/03/08 02:01:44 changed by openlayers

  • attachment RightMouse.patch added.

(follow-up: ↓ 3 ) 04/03/08 02:11:31 changed by openlayers

  • state set to Review.

Right mouse events patch added. I am not familiar yet with the test suite so there are currently no tests installed with the patch. There is also currently no option to turn on/off the support from the OpenLayers.Map hence this patch overrides the oncontextmenu (default right click) event. Browser events added in OpenLayers.Events are rightclick and dblrightclick. Currently implemented in Controls.Navigation is a new method called defaultRightDblClick which support the zoom out functionality. David Martin

(in reply to: ↑ 2 ) 04/24/08 08:22:04 changed by pvalsecc

Shouldn't you do something like that instead?

    mouseup:  function (evt) { 
      var propagate = true; 
      // Collect right mouse clicks from the mouseup 
      // IE - ignores the second right click in mousedown so using mouseup instead 
      if (this.checkModifiers(evt) && OpenLayers.Event.isRightClick(evt)) { 
         return this.rightclick(evt);             
      } 
      return propagate; 
    },

in order to propagate the "propagate" of the rightclick method...

05/27/08 01:16:16 changed by itbeyond

Yes correct I will modify the patch and upload a new version. Thanks for pointing this out.

05/27/08 01:29:08 changed by itbeyond

  • attachment RightMouseV2.patch added.

This version corrects the return missing for the event generated in the Click.js