Vladimir Agafonkin
21cfd7f3d9
replace Events mixin with Evented inheritance
2013-12-17 14:07:21 -05:00
danzel
58551506f2
Don't fire dragend if a dragstart did not occur due to a multitouch action. fixes #2256
2013-12-02 14:06:47 +13:00
danzel
b2959b4488
IE doesn't support e.target, use srcElement.
...
http://stackoverflow.com/questions/1143196/ie-e-target-id-is-not-working
2013-11-15 10:16:42 +13:00
Vladimir Agafonkin
db446f3e46
add leaflet-drag-target class to dragged elements, ref #2164 , #1902
2013-11-13 12:56:04 +02:00
Vladimir Agafonkin
ddbb01c3da
add distance to dragend event data, close #2158 , ref #872
2013-11-06 21:17:35 +02:00
Vladimir Agafonkin
b0df9627b0
Merge pull request #2117 from danzel/fix-2094
...
Fix click events when touch zooming on ie 10
2013-10-23 04:36:51 -07:00
danzel
6855e7dfd8
The drag click avoid hack is needed for touch zooms on ie10 also, when releasing your fingers after a touch zoom click events are generated. Fixes #2094
2013-10-23 16:28:56 +13:00
danzel
91cc18503c
Remove leftover code from the draggable/tap cleanup. Fixes #2103
2013-10-21 11:38:19 +13:00
Vladimir Agafonkin
9d28dbb360
hopefully fix IE11/Win8.1 touch interaction, close #2102 (thanks @fnicollet)
...
#2103 may be related too
2013-10-18 12:55:50 +03:00
danzel
dbced20543
MsTouch needs preventDefault. Fixes #2000
2013-08-29 09:22:36 +12:00
Dag Jomar Mersland
d78fb49943
Fix for iPad, where el.tagName was undefined when clicking on labels.
2013-08-19 10:14:36 +02:00
Stefan Sydow
1b584afc49
remove tailing spaces for jake build
2013-08-09 09:28:08 +02:00
fastrde
5de0be072a
moved this._moved = false to the top of _onDown to fix an Issue von shift-click after dragging
2013-08-08 15:32:48 +02:00
John Firebaugh
4a8b5486c9
Disable text selection on mousedown rather than move
...
This seems to fix #1800 and a related unfiled issue reported in
IRC regarding tiles becoming selected on double-click when a
vector layer is present.
2013-06-27 18:06:43 -04:00
John Firebaugh
1b5a77f77d
Also disable user-drag/prevent dragstart events
...
Unlike preventTextSelection, it appears important that
this happens on mousedown rather than the first mousemove
event. Otherwise, tile images are still sometimes draggable
on Firefox.
2013-06-25 10:12:02 -04:00
Vladimir Agafonkin
3076210fd1
revert remove preventDefault #1782 , breaks FF
2013-06-24 23:55:11 -04:00
Vladimir Agafonkin
f1e87ef665
remove unnecessary preventDefault
2013-06-24 23:24:52 -04:00
Vladimir Agafonkin
95d6d27cb0
Merge branch 'iframe-drag'
...
* iframe-drag:
fix jshint errors
Refine existing methods for disabling text selection
Add iframe debug html
Suppress text selection behavior during drag
Continue to preventDefault on touch
Remove preventDefault and mousedown workaround
2013-06-24 23:23:54 -04:00
Vladimir Agafonkin
f9ea4758f8
move all tap hacks code into a separate handler, close #1781
2013-06-24 18:17:25 -04:00
John Firebaugh
60476da33c
Refine existing methods for disabling text selection
2013-06-24 17:37:19 -04:00
John Firebaugh
ea8af5c2a1
Suppress text selection behavior during drag
...
Reference: https://github.com/mbostock/d3/pull/1289
2013-06-24 16:34:59 -04:00
John Firebaugh
05461bdd11
Continue to preventDefault on touch
2013-06-24 16:34:59 -04:00
John Firebaugh
37c4842a73
Remove preventDefault and mousedown workaround
...
As long as the mousedown event does not have preventDefault,
dragging out of an iframe works as expected.
2013-06-24 16:34:59 -04:00
Tom MacWright
95abf5a385
Remove mouseout binding on up
2013-06-24 14:45:29 -04:00
Tom MacWright
e614b60d2b
Remove debugging
2013-06-24 14:33:41 -04:00
Tom MacWright
baef8e1ffe
End drag events on mouseout of document, fixes #1277
2013-06-24 14:33:01 -04:00
Vladimir Agafonkin
340dacde81
remove hasOwnProperty checks, close #1606
2013-04-20 11:32:23 +03:00
Vladimir Agafonkin
5ded0ba150
more draggable cleanup
2013-04-19 15:36:18 +03:00
Vladimir Agafonkin
81e2a33f7d
cleanup draggable
2013-04-19 14:45:01 +03:00
fabriceds
2591f53a28
Fixes box-zooming in Firefox 18+
2013-02-18 14:38:11 +01:00
Vladimir Agafonkin
b9727d9190
made up my mind about comment format, add some more comments
2012-12-20 12:37:40 +02:00
Vladimir Agafonkin
b0e5c817a9
more comments and cleanup
2012-12-19 18:47:28 +02:00
danzel
5e35553361
Code tidyups from mourners feedback.
2012-11-16 11:28:01 +13:00
danzel
0efa63500c
Fix up 2 places where L.Draggable.START hadn't been updated for it being an array (thanks mourner)
2012-11-16 10:57:29 +13:00
danzel
41a85b0128
Only wire move/end listeners for the thing we want to listen to.
...
Stops potential bug:
User touches on device, user moves mouse. These mouse move events would have panned the map, now they won't.
2012-11-16 10:57:28 +13:00
danzel
cb9407ffee
Sort of working Draggable support for touch+mouse devices.
2012-11-16 10:57:26 +13:00
Vladimir Agafonkin
dbd4da6255
add shortcuts for extend, bind, stamp and setOptions
2012-11-07 20:30:56 +02:00
Vladimir Agafonkin
2b225cc3a8
more whitespace fixes
2012-11-07 18:46:59 +02:00
danzel
edaa1bbcec
Disable longPress contextmenu emulation on msTouch, it natively fires its own contextmenu event after a longpress is released.
2012-10-31 13:26:56 +13:00
danzel
081edc283e
Rename timeout to match other vars
2012-10-31 13:25:29 +13:00
danzel
5f960721d9
Use L.Util.bind instead of var self.
2012-10-31 13:11:16 +13:00
danzel
3aeff55f24
Rename contextMenuEmulation -> longPress
2012-10-31 13:05:38 +13:00
danzel
9783d9ba22
Cancel contextMenu emulation timeout if >1 touches happen (Put them down for a touch zoom and didn't move them for example)
2012-10-31 12:59:59 +13:00
danzel
514908f812
Stop touchStart propagation in Draggable. Without this dragging marker will fire a contextmenu event on touch as the map gets a touch start/end event but none of the moves.
2012-10-31 12:59:58 +13:00
danzel
1aff46cb27
Rewrite longpress->contextmenu to live inside Draggable instead as it needs deep interaction with it. When an emulated contextmenu is fired on touch we stop dragging and stop a click event from occurring. New map option to disable it if required: touchContextMenuEmulation
2012-10-31 12:59:58 +13:00
danzel
af2318afaa
Ensure we still fire the dragend event. Move click simulation until after the drag has finished (clicking during a drag seems weird).
2012-10-18 14:23:14 +13:00
Marcel Sulek
ba22cc28b2
IE10 - fix of not simulating clicks even when drag was within TAP_TOLERANCE
...
(cherry picked from commit b7e84aed9b77c51e2a4698251bf38ccf46b82dc7)
2012-10-18 14:23:14 +13:00
Vladimir Agafonkin
4ed3c97bcd
fix various master regressions
2012-09-11 12:33:54 +03:00
Vladimir Agafonkin
9625cdbbb9
fixed glitches with zooming on pan animation and panning on zoom animation
2012-08-13 15:41:20 +03:00
Vladimir Agafonkin
2d2fc74110
get rid of the legacy L.Transition, replace with a better and simpler L.PosAnimation
2012-08-10 18:43:46 +03:00