Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
67aeb9b
Inherit each draw and edithandler from L.ToolbarHandler. Refactor bui…
justinmanley Nov 27, 2014
6f65a44
Add leaflet-toolbar as a dependency in package.json.
justinmanley Nov 27, 2014
38992c4
Fix error in Leaflet.Toolbar dependency in package.json.
justinmanley Nov 27, 2014
9896366
Remove build dependency on Leaflet.Toolbar (assume that app developer…
justinmanley Jan 3, 2015
c030219
Remove test L.Draw.Control and add skeleton spec for DrawToolbar.Cont…
justinmanley Jan 3, 2015
68d0ccb
Modify each draw handler to extend L.ToolbarAction (rather than L.Han…
justinmanley Jan 3, 2015
d755267
Move EditToolbar handlers into src/edit/control. Revert each edit han…
justinmanley Jan 3, 2015
0bb6555
Delete src/Toolbar.js (it's completely replaced by Leaflet.Toolbar).
justinmanley Jan 3, 2015
649f267
Remove old Control.Draw and DrawToolbar code.
justinmanley Jan 3, 2015
84ef746
Add new control-style draw toolbar extending Leaflet.Toolbar.
justinmanley Jan 3, 2015
89335a5
Add new control-style edit toolbar extending Leaflet.Toolbar (L.Edit.…
justinmanley Jan 3, 2015
05418a4
Add popup-style toolbar for editing features on the map. Uses Leaflet…
justinmanley Jan 3, 2015
747c4cf
Take advantage of localization for the tooltips of each Leaflet.draw …
justinmanley Jan 15, 2015
2b6d0ab
Add selectedPathOptions to L.Control.Edit to give polylines and polyg…
justinmanley Jan 16, 2015
1affa54
Fix tests by adding Leaflet.toolbar as a dependency in karma.conf.js.
justinmanley Jan 16, 2015
3875ca8
Fix circle drawing handler tooltip.
justinmanley Jan 16, 2015
1f1670d
Add drawControl and drawControlTooltips options to L.Map. Fixes Leafl…
justinmanley Feb 1, 2015
9822985
Tweak EditToolbar.Popup to offset the popup toolbar if it is opened o…
justinmanley Feb 9, 2015
c0d9203
Tweak stylesheet to remove spritesheet images from toolbar background…
justinmanley Feb 9, 2015
737fea4
Update karma configuration to point to leaflet.toolbar-src.js (from L…
justinmanley Feb 9, 2015
3e51769
Adding Leaflet.toolbar to be used in the examples.
jacobtoye May 18, 2015
186f6d3
Getting Leaflet.draw to work with Leaflet.toolbar. Sorry single commi…
jacobtoye May 18, 2015
1e9df5a
Make sure the toolbar have no marking as the container now has.
jacobtoye May 18, 2015
60d8c13
Rename the Cancel and RemoveLastPoint Toolbar actions to be Draw.Cont…
jacobtoye May 18, 2015
c4f0f9b
Remove commented out code.
jacobtoye May 18, 2015
b93cf22
Begin adding intermediate toolbar actions.
jacobtoye May 20, 2015
69c5147
No longer need to take care of handling disabling other handlers when…
jacobtoye May 20, 2015
27f6475
Make it do we don't try to enable a toolbar action twice in a row.
jacobtoye May 20, 2015
a8f0c1f
Listen for disabled and enabled events from the draw handlers. This e…
jacobtoye May 20, 2015
52f3102
Adding support for changing the draw handler options after initializa…
jacobtoye May 20, 2015
dc7eb53
Updating include files for full example.
jacobtoye May 20, 2015
635e02b
Fixed toolbar removal
nateemerson Sep 3, 2015
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
15 changes: 10 additions & 5 deletions build/deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ var deps = {

CommonUI: {
src: [
'Control.Draw.js',
'Toolbar.js',
'Tooltip.js'
],
desc: 'Common UI components used.',
Expand All @@ -55,7 +53,10 @@ var deps = {

DrawUI: {
src: [
'draw/DrawToolbar.js'
'draw/DrawToolbar.js',
'draw/control/Draw.Control.Cancel.js',
'draw/control/Draw.Control.RemoveLastPoint.js',
'draw/control/DrawToolbar.Control.js'
],
desc: 'Draw toolbar.',
deps: ['DrawHandlers', 'CommonUI']
Expand All @@ -64,8 +65,12 @@ var deps = {
EditUI: {
src: [
'edit/EditToolbar.js',
'edit/handler/EditToolbar.Edit.js',
'edit/handler/EditToolbar.Delete.js'
'edit/control/Edit.Control.Edit.js',
'edit/control/Edit.Control.Delete.js',
'edit/control/EditToolbar.Control.js',
'edit/popup/Edit.Popup.Edit.js',
'edit/popup/Edit.Popup.Delete.js',
'edit/popup/EditToolbar.Popup.js'
],
desc: 'Edit toolbar.',
deps: ['EditHandlers', 'CommonUI']
Expand Down
8 changes: 4 additions & 4 deletions dist/leaflet.draw.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
position: relative;
}

.leaflet-draw-toolbar {
margin-top: 12px;
.leaflet-draw-toolbar.leaflet-control-toolbar {
margin: 0;
}

.leaflet-draw-toolbar-top {
Expand All @@ -22,12 +22,12 @@
border-bottom-right-radius: 0;
}

.leaflet-draw-toolbar a {
.leaflet-draw-toolbar > li > a {
background-image: url('images/spritesheet.png');
background-repeat: no-repeat;
}

.leaflet-retina .leaflet-draw-toolbar a {
.leaflet-retina .leaflet-draw-toolbar > li > a {
background-image: url('images/spritesheet-2x.png');
background-size: 270px 30px;
}
Expand Down
23 changes: 17 additions & 6 deletions examples/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
<title>Leaflet.draw drawing and editing tools</title>

<link rel="stylesheet" href="libs/leaflet.css" />
<link rel="stylesheet" href="libs/leaflet.toolbar.css" />
<link rel="stylesheet" href="../dist/leaflet.draw.css" />


<script src="libs/leaflet-src.js"></script>
<script src="libs/leaflet.toolbar-src.js"></script>

<script src="../src/Leaflet.draw.js"></script>

<script src="../src/edit/handler/Edit.Poly.js"></script>
<script src="../src/edit/handler/Edit.SimpleShape.js"></script>
<script src="../src/edit/handler/Edit.Circle.js"></script>
<script src="../src/edit/handler/Edit.Rectangle.js"></script>
<script src="../src/edit/handler/Edit.Marker.js"></script>

<script src="../src/draw/handler/Draw.Feature.js"></script>
<script src="../src/draw/handler/Draw.Polyline.js"></script>
Expand All @@ -32,12 +34,21 @@

<script src="../src/Control.Draw.js"></script>
<script src="../src/Tooltip.js"></script>
<script src="../src/Toolbar.js"></script>

<script src="../src/draw/control/Draw.Control.Cancel.js"></script>
<script src="../src/draw/control/Draw.Control.RemoveLastPoint.js"></script>
<script src="../src/draw/control/Draw.Control.ToolbarAction.js"></script>
<script src="../src/draw/DrawToolbar.js"></script>
<script src="../src/draw/control/DrawToolbar.Control.js"></script>

<script src="../src/edit/control/Edit.Control.Delete.js"></script>
<script src="../src/edit/control/Edit.Control.Edit.js"></script>
<script src="../src/edit/EditToolbar.js"></script>
<script src="../src/edit/handler/EditToolbar.Edit.js"></script>
<script src="../src/edit/handler/EditToolbar.Delete.js"></script>
<script src="../src/edit/control/EditToolbar.Control.js"></script>

<script src="../src/edit/popup/Edit.Popup.Delete.js"></script>
<script src="../src/edit/popup/Edit.Popup.Edit.js"></script>
<script src="../src/edit/popup/EditToolbar.Popup.js"></script>
</head>
<body>
<div id="map" style="width: 800px; height: 600px; border: 1px solid #ccc"></div>
Expand All @@ -55,7 +66,7 @@
L.drawLocal.draw.toolbar.buttons.polygon = 'Draw a sexy polygon!';

var drawControl = new L.Control.Draw({
position: 'topright',
position: 'topleft',
draw: {
polyline: {
metric: true
Expand Down Expand Up @@ -83,7 +94,7 @@
remove: false
}
});
map.addControl(drawControl);
drawControl.addTo(map);

map.on('draw:created', function (e) {
var type = e.layerType,
Expand Down
55 changes: 32 additions & 23 deletions examples/full.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,52 @@
<head>
<title>Leaflet.draw vector editing handlers</title>

<script src="libs/leaflet-src.js"></script>
<link rel="stylesheet" href="libs/leaflet.css" />

<script src="../src/Leaflet.draw.js"></script>
<link rel="stylesheet" href="libs/leaflet.toolbar.css" />
<link rel="stylesheet" href="../dist/leaflet.draw.css" />

<script src="../src/Toolbar.js"></script>
<script src="../src/Tooltip.js"></script>
<script src="libs/leaflet-src.js"></script>
<script src="libs/leaflet.toolbar-src.js"></script>

<script src="../src/ext/GeometryUtil.js"></script>
<script src="../src/ext/LatLngUtil.js"></script>
<script src="../src/ext/LineUtil.Intersect.js"></script>
<script src="../src/ext/Polygon.Intersect.js"></script>
<script src="../src/ext/Polyline.Intersect.js"></script>
<script src="../src/Leaflet.draw.js"></script>

<script src="../src/edit/handler/Edit.Poly.js"></script>
<script src="../src/edit/handler/Edit.SimpleShape.js"></script>
<script src="../src/edit/handler/Edit.Circle.js"></script>
<script src="../src/edit/handler/Edit.Rectangle.js"></script>
<script src="../src/edit/handler/Edit.Marker.js"></script>

<script src="../src/draw/DrawToolbar.js"></script>
<script src="../src/draw/handler/Draw.Feature.js"></script>
<script src="../src/draw/handler/Draw.SimpleShape.js"></script>
<script src="../src/draw/handler/Draw.Polyline.js"></script>
<script src="../src/draw/handler/Draw.Circle.js"></script>
<script src="../src/draw/handler/Draw.Marker.js"></script>
<script src="../src/draw/handler/Draw.Polygon.js"></script>
<script src="../src/draw/handler/Draw.SimpleShape.js"></script>
<script src="../src/draw/handler/Draw.Rectangle.js"></script>
<script src="../src/draw/handler/Draw.Circle.js"></script>
<script src="../src/draw/handler/Draw.Marker.js"></script>


<script src="../src/edit/EditToolbar.js"></script>
<script src="../src/edit/handler/EditToolbar.Edit.js"></script>
<script src="../src/edit/handler/EditToolbar.Delete.js"></script>
<script src="../src/ext/LatLngUtil.js"></script>
<script src="../src/ext/GeometryUtil.js"></script>
<script src="../src/ext/LineUtil.Intersect.js"></script>
<script src="../src/ext/Polyline.Intersect.js"></script>
<script src="../src/ext/Polygon.Intersect.js"></script>

<script src="../src/Control.Draw.js"></script>
<script src="../src/Tooltip.js"></script>

<script src="../src/edit/handler/Edit.Poly.js"></script>
<script src="../src/edit/handler/Edit.SimpleShape.js"></script>
<script src="../src/edit/handler/Edit.Circle.js"></script>
<script src="../src/edit/handler/Edit.Rectangle.js"></script>
<script src="../src/edit/handler/Edit.Marker.js"></script>
<script src="../src/draw/control/Draw.Control.Cancel.js"></script>
<script src="../src/draw/control/Draw.Control.RemoveLastPoint.js"></script>
<script src="../src/draw/control/Draw.Control.ToolbarAction.js"></script>
<script src="../src/draw/DrawToolbar.js"></script>
<script src="../src/draw/control/DrawToolbar.Control.js"></script>

<script src="../src/edit/control/Edit.Control.Delete.js"></script>
<script src="../src/edit/control/Edit.Control.Edit.js"></script>
<script src="../src/edit/EditToolbar.js"></script>
<script src="../src/edit/control/EditToolbar.Control.js"></script>

<script src="../src/edit/popup/Edit.Popup.Delete.js"></script>
<script src="../src/edit/popup/Edit.Popup.Edit.js"></script>
<script src="../src/edit/popup/EditToolbar.Popup.js"></script>
</head>
<body>
<div id="map" style="width: 800px; height: 600px; border: 1px solid #ccc"></div>
Expand Down
Loading