[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/osm 8e8e4583f5 74/77: More robust mouse dragging
From: |
ELPA Syncer |
Subject: |
[elpa] externals/osm 8e8e4583f5 74/77: More robust mouse dragging |
Date: |
Mon, 7 Mar 2022 08:58:09 -0500 (EST) |
branch: externals/osm
commit 8e8e4583f57a4fd00415d63c967af3d7868effcd
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
More robust mouse dragging
---
README.org | 2 +-
osm.el | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/README.org b/README.org
index 0faaa05271..03ca23fb60 100644
--- a/README.org
+++ b/README.org
@@ -72,7 +72,7 @@ Key bindings in =osm-mode= buffer:
- ~<mouse-2>~: =osm-org-link-click= - Store point as Org link
- ~<mouse-3>~: =osm-bookmark-set-click= - Store point as bookmark
- ~<S-mouse-3>~: =osm-bookmark-delete-click= - Delete bookmark at point
-- ~<down-mouse-1>~: =osm-drag= - Drag the map with the mouse
+- ~<down-mouse-*>~: =osm-drag= - Drag the map with the mouse
- ~g~: =osm-goto= - Go to location
- ~h~: =osm-home= - Go to home location
- ~s~: =osm-search= - Search for location
diff --git a/osm.el b/osm.el
index 9a49869c26..470e71b25d 100644
--- a/osm.el
+++ b/osm.el
@@ -140,6 +140,8 @@ Should be at least 7 days according to the server usage
policies."
(define-key map [mouse-3] #'osm-bookmark-set-click)
(define-key map [S-mouse-3] #'osm-bookmark-delete-click)
(define-key map [down-mouse-1] #'osm-drag)
+ (define-key map [down-mouse-2] #'osm-drag)
+ (define-key map [down-mouse-3] #'osm-drag)
(define-key map [up] #'osm-up)
(define-key map [down] #'osm-down)
(define-key map [left] #'osm-left)
@@ -357,12 +359,17 @@ Should be at least 7 days according to the server usage
policies."
(define-key map [mouse-movement]
(lambda (event)
(interactive "@e")
+ (define-key map [mouse-1] #'ignore)
+ (define-key map [mouse-2] #'ignore)
+ (define-key map [mouse-3] #'ignore)
(pcase-let ((`(,ex . ,ey) (posn-x-y (event-start event))))
(setq osm--x (- sx ex)
osm--y (- sy ey))
(osm--update))))
(setq track-mouse 'dragging)
- (set-transient-map map t (lambda () (setq track-mouse nil)))))
+ (set-transient-map map
+ (lambda () (eq (car-safe last-input-event)
'mouse-movement))
+ (lambda () (setq track-mouse nil)))))
(defun osm-zoom-click (event)
"Zoom to the location of the click EVENT."
- [elpa] externals/osm 1bd4751bcf 34/77: Better link names, (continued)
- [elpa] externals/osm 1bd4751bcf 34/77: Better link names, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 7a50000e1e 58/77: Add separate resize function, revert tile cache, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 4c9337bf79 69/77: Update README, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 76b41f5fb5 51/77: Add keybindings, ELPA Syncer, 2022/03/07
- [elpa] externals/osm a6335090e9 33/77: Handle multiple windows, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 2fbf12f0ef 46/77: seq is not needed, ELPA Syncer, 2022/03/07
- [elpa] externals/osm c2c7dff887 22/77: Compact server configuration, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 7ce1d26c88 67/77: Extract osm--make-tile, ELPA Syncer, 2022/03/07
- [elpa] externals/osm ff8ff68b4d 65/77: Check if bookmarks are present, ELPA Syncer, 2022/03/07
- [elpa] externals/osm cb191d426f 76/77: Version 0.2, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 8e8e4583f5 74/77: More robust mouse dragging,
ELPA Syncer <=
- [elpa] externals/osm d776cdb343 42/77: Fix melpa issues (See https://github.com/melpa/melpa/pull/7936), ELPA Syncer, 2022/03/07
- [elpa] externals/osm 5b82b32201 28/77: Add server descriptions, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 832bce78f8 72/77: Implement proper map dragging with the mouse, ELPA Syncer, 2022/03/07
- [elpa] externals/osm df844cd56b 30/77: Add osm-rename command, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 458257fa1f 19/77: Improve tile loading, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 699aae27b1 20/77: Rename osm-new to osm-home, ELPA Syncer, 2022/03/07
- [elpa] externals/osm d830691585 61/77: README: Remove wishlist, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 25621bb80e 41/77: curl add --fail argument, ELPA Syncer, 2022/03/07
- [elpa] externals/osm b300e42d9f 68/77: Add transient pin, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 28d3305bef 32/77: Improve handling of generated names, ELPA Syncer, 2022/03/07