maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH] maposmatic: Use Alt+drag to select the BBox on


From: David MENTRE
Subject: [Maposmatic-dev] [PATCH] maposmatic: Use Alt+drag to select the BBox on Mac
Date: Sat, 7 Apr 2012 11:33:05 +0200

The Ctrl+drag command cannot be used on Mac platform. Use Alt+drag
instead.

Original patch submitted by S├ębastien Tanguy.

Signed-off-by: David MENTRE <address@hidden>
Signed-off-by: S├ębastien Tanguy
---
 www/media/js/osm.js               |    4 +++-
 www/templates/maposmatic/new.html |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/www/media/js/osm.js b/www/media/js/osm.js
index 13a48a6..ab00e62 100644
--- a/www/media/js/osm.js
+++ b/www/media/js/osm.js
@@ -144,7 +144,9 @@ function mapInit(areaSelectionNotifier)
     OpenLayers.Util.extend(selectControl, {
         draw: function() {
             this.box = new OpenLayers.Handler.Box(selectControl,
-                {'done': this.notice}, {keyMask: OpenLayers.Handler.MOD_CTRL});
+                {'done': this.notice},
+                {keyMask: navigator.platform.match(/Mac/) ?
+                     OpenLayers.Handler.MOD_ALT :OpenLayers.Handler.MOD_CTRL});
             this.box.activate();
         },
 
diff --git a/www/templates/maposmatic/new.html 
b/www/templates/maposmatic/new.html
index 8cf9a8d..fb41e70 100644
--- a/www/templates/maposmatic/new.html
+++ b/www/templates/maposmatic/new.html
@@ -93,7 +93,8 @@
       <img src="/smedia/tip.png" class="tip" />
       <p class="bbox_select_help">
         {% blocktrans %}You can use <tt>Shift+drag</tt> to zoom on a specific
-        area of the map. Then, you must select with <tt>Control+drag</tt> the
+        area of the map. Then, you must select
+        with <tt>Control+drag</tt> (<tt>Alt+drag</tt> on Mac) the
         limits of the area you wish to render.{% endblocktrans %}
       </p>
 
-- 
1.7.5.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]