Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch support #285

Closed
wants to merge 76 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2a26a48
on touch for draw marker
Mar 27, 2014
acb274a
touch support for Draw Polyline
Mar 27, 2014
f1ead53
removed my L.Browser.touch
Mar 27, 2014
5ac978f
added removehook for touch
Mar 28, 2014
ee5a904
extended touchstart and touchend support for L.map
Mar 28, 2014
717cea9
added other touch events to track...not done with it as of yet
Mar 28, 2014
76a6b69
added support for creating circles with touch
Mar 31, 2014
6cd75e2
all controls
Apr 1, 2014
fc62a32
added touchevents to build
Apr 2, 2014
e6709db
updated touch events location and name
Apr 7, 2014
8f6f2c7
#TODO: fix ployline glitchyness on shape completion
Apr 7, 2014
2be451e
tooltip for touch on edit
Apr 7, 2014
1a864d4
added touch support for markers
Apr 8, 2014
51f3613
Markers relocating on touchmove :)
Apr 9, 2014
91d483f
added comments
Apr 10, 2014
9ad1d05
got circle editing working
Apr 10, 2014
8b44042
removed an unused file
Apr 10, 2014
62d1ed4
made rectangles resizable for touch
Apr 14, 2014
184d03a
rebuilt src files
Apr 14, 2014
8745b5d
Merge remote-tracking branch 'upstream/master'
Apr 14, 2014
8883735
added finish button to complete polyline/shap for a better ux on touc…
Apr 14, 2014
784bd49
rebuilt files
Apr 14, 2014
aea65ed
oops, used the wrong text for finish :P
Apr 14, 2014
b74ee5d
in ios touchend doesn't fire after moving which is why we use touchca…
Apr 14, 2014
d4a1b2e
rebuilt src files
Apr 14, 2014
076c7ad
cleaner approach to stopping touchcancel in IOS
Apr 14, 2014
f0696cf
added options to have a different Icon for touch devices for ease of …
Apr 15, 2014
2c5cacd
working on adding in color controls
Apr 21, 2014
1e60da4
color changes for all tools
Apr 22, 2014
8b46d9b
added style overrides for spectrum.js
Apr 22, 2014
ff75076
rebuild files and added colorable to build
Apr 22, 2014
24313ed
removed disable style for color since it's always in if added
Apr 22, 2014
846e0a1
rebuilt files"
Apr 22, 2014
19bde5d
Set default option to colorable to false
Apr 22, 2014
a088c86
changed colorable defaults
Apr 23, 2014
ab9d9ad
removed edit styles incase user uses custom color and alpha
Apr 23, 2014
5801bdb
working on added edit color, alpha and stroke thickness
Apr 23, 2014
f2a31f4
switched spaces to tabs since leaflet.draw uses tabs :(
Apr 24, 2014
789ff6f
commented out bad code for fixing later
Apr 25, 2014
6998dc2
rebuilt files
Apr 25, 2014
1fef598
created L.toolbar to allow changes to the toolbar after creation
Apr 28, 2014
25bd00b
rebuilt files
Apr 28, 2014
6e1a1eb
oops :D
Apr 28, 2014
089cabd
rebuilt without errors...ugh, I need to be better about that. My bad
Apr 28, 2014
e0d8be4
fix error on moving objects besides box tool
Apr 28, 2014
0cbe5f2
fixed map undefined issue in Poly Edit
Apr 30, 2014
c7b69b8
ugh, stupid debugger was left in there
Apr 30, 2014
96f06bc
fix marker position on touch zoom
Apr 30, 2014
3e21e7a
rebuilt files
Apr 30, 2014
d54fea4
replaced spaces with tabs
Apr 30, 2014
ed3bc77
space to tabs
May 5, 2014
bf3091f
took colorable out to put in a seperate branch
May 8, 2014
326e880
took colorable out of build and rebuilt files
May 9, 2014
d226068
A slightly better fix to the pageX error on touch events.
gmccrackin May 11, 2014
a623541
Allow touch devices to drag ghost markers in polylines and polygons.
gmccrackin May 11, 2014
9326dcb
Merge pull request #2 from gmccrackin/master
michaelguild13 May 11, 2014
2570427
updated from upstream
May 12, 2014
0d7c730
bug fix found by solo999
May 27, 2014
cf2ccaf
rebuilt files
May 27, 2014
8f9c81f
fixed markers draggable for touch
May 27, 2014
1cfb27b
Temp fix for leaflet click until it's fixed
May 29, 2014
552612e
rebuilt files
Jun 10, 2014
20ba2fb
updated from upstream. Fixed merge conflicts. Will be testing
michaelguild13 Feb 25, 2015
3a94d18
rebuilt dist
michaelguild13 Feb 25, 2015
ffd120e
oops...re-added images :P
michaelguild13 Feb 25, 2015
6afad6d
added back in css..oops again
michaelguild13 Feb 25, 2015
e2fe3a4
added history of why I started touch support
michaelguild13 Feb 25, 2015
c05b18c
Remove correct events from Polyline
Aug 6, 2015
e753b7d
Merge pull request #3 from azavea/master
michaelguild13 Aug 6, 2015
34f42fd
added this._onMouseMove(e); to draw polyline - Mike Kleywegt fix
michaelguild13 Sep 4, 2015
d85dae1
added example demo link
michaelguild13 Oct 29, 2015
ab1cbeb
Update build.
canye21 Oct 30, 2015
1eced8b
fix hook marker not move in Cicle Edit
canye21 Oct 30, 2015
e40393c
remove click handler when disabling L.Draw.Marker
cduzan Feb 10, 2016
efdecca
Merge pull request #5 from canye21/master
michaelguild13 Mar 7, 2016
924efaa
Merge pull request #6 from cduzan/master
michaelguild13 Mar 7, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#Leaflet.draw With Touch
This is a touch friendly version of Leaflet.draw that was created and maintained by Michael Guild (https://github.com/michaelguild13).

Demo link : https://cdn.rawgit.com/michaelguild13/Leaflet.draw/master/examples/basic.html

The touch support was initiated due to a demand for it at National Geographic for their Map Maker Projected (http://mapmaker.education.nationalgeographic.com/) that was created by Michael Guild and Daniel Schep (https://github.com/dschep)

# Important
Leaflet.draw 0.2.3+ requires [Leaflet 0.7](https://github.com/Leaflet/Leaflet/archive/v0.7.zip) or higher.

Expand Down Expand Up @@ -229,7 +236,7 @@ Polygon options include all of the Polyline options plus the option to show the

| Option | Type | Default | Description
| --- | --- | --- | ---
| shapeOptions | [Leaflet Path options](http://leafletjs.com/reference.html#path-options) | [See code](https://github.com/Leaflet/Leaflet.draw/blob/master/src/draw/handler/Draw.Circle.js#L7) | The options used when drawing the circle on the map.
| shapeOptions | [Leaflet Path options](http://leafletjs.com/reference.html#path-options) | [See code](https://github.com/Leaflet/Leaflet.draw/blob/master/src/draw/handler/Draw.Circle.js#L7) | The options used when drawing the circle on the map.
| repeatMode | Bool | `false` | Determines if the draw tool remains enabled after drawing a shape.

<a name="markeroptions" />
Expand Down Expand Up @@ -424,7 +431,7 @@ drawControl.setDrawingOptions({

### Creating a custom build

If you only require certain handlers (and not the UI), you may wish to create a custom build. You can generate the relevant jake command using the [build html file](https://github.com/Leaflet/Leaflet.draw/blob/master/build/build.html).
If you only require certain handlers (and not the UI), you may wish to create a custom build. You can generate the relevant jake command using the [build html file](https://github.com/Leaflet/Leaflet.draw/blob/master/build/build.html).

See [edit handlers example](https://github.com/Leaflet/Leaflet.draw/blob/master/examples/edithandlers.html) which uses only the edit handlers.

Expand Down
3 changes: 2 additions & 1 deletion build/deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var deps = {

Extensions: {
src: [
'ext/TouchEvents.js',
'ext/LatLngUtil.js',
'ext/GeometryUtil.js',
'ext/LineUtil.Intersect.js',
Expand Down Expand Up @@ -65,7 +66,7 @@ var deps = {
src: [
'edit/EditToolbar.js',
'edit/handler/EditToolbar.Edit.js',
'edit/handler/EditToolbar.Delete.js'
'edit/handler/EditToolbar.Delete.js',
],
desc: 'Edit toolbar.',
deps: ['EditHandlers', 'CommonUI']
Expand Down
Loading