<commit_before><!DOCTYPE html>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="../node_modules/leaflet/dist/leaflet.css" />
	<link rel="stylesheet" type="text/css" href="../node_modules/leaflet-draw/dist/leaflet.draw.css" />
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="../dist/Leaflet.Toolbar.css"/>
	<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">	
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
	<script src="../node_modules/leaflet/dist/leaflet-src.js"></script>
	<script src="../dist/Leaflet.Toolbar.js"></script>
	<script src="../node_modules/leaflet-draw/dist/leaflet.draw-src.js"></script>
	<script src="ColorPicker.js"></script>
	<style>
		html, body, #map { margin: 0; height: 100%; width: 100%; }
	</style>	
</head>
<body>
	<div id="map"></div>
	<style>
		.leaflet-toolbar-icon .fa { color: #000; }
		.leaflet-color-swatch { background-color: #fff; }
	</style>	
	<script>
		var map = L.map('map').setView([41.7896,-87.5996], 15),
			drawnItems = new L.FeatureGroup().addTo(map),
			editActions = [
				L.Edit.Popup.Edit,
				L.Edit.Popup.Delete,
				L.ToolbarAction.extendOptions({
					toolbarIcon: { 
						className: 'leaflet-color-picker', 
						html: '<span class="fa fa-eyedropper"></span>' 
					},
					subToolbar: new L.Toolbar({ actions: [
						L.ColorPicker.extendOptions({ color: '#db1d0f' }),
						L.ColorPicker.extendOptions({ color: '#025100' }),
						L.ColorPicker.extendOptions({ color: '#ffff00' }),
						L.ColorPicker.extendOptions({ color: '#0000ff' })
					]})
				})
			];

		L.tileLayer("http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", {
			attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'
		}).addTo(map);

		new L.DrawToolbar.Control({ 
			position: 'topleft',
			className: 'leaflet-draw-toolbar',
		}).addTo(map);

		map.on('draw:created', function(evt) {
			var	type = evt.layerType,
				layer = evt.layer;

			drawnItems.addLayer(layer);

			layer.on('click', function(event) {
				var latlng = event.latlng;

				new L.EditToolbar.Popup(latlng, { 
					className: 'leaflet-draw-toolbar',
					actions: editActions
				}).addTo(map, layer);
			});
		});
	</script>
</body>
</html><commit_msg>Tweak popup-style toolbar example to open popup toolbar above markers. Fixes #9.<commit_after><!DOCTYPE html>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="../node_modules/leaflet/dist/leaflet.css" />
	<link rel="stylesheet" type="text/css" href="../node_modules/leaflet-draw/dist/leaflet.draw.css" />
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
	<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="../dist/Leaflet.Toolbar.css"/>
	<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">	
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
	<script src="../node_modules/leaflet/dist/leaflet-src.js"></script>
	<script src="../dist/Leaflet.Toolbar.js"></script>
	<script src="../node_modules/leaflet-draw/dist/leaflet.draw-src.js"></script>
	<script src="ColorPicker.js"></script>
	<style>
		html, body, #map { margin: 0; height: 100%; width: 100%; }
	</style>	
</head>
<body>
	<div id="map"></div>
	<style>
		.leaflet-toolbar-icon .fa { color: #000; }
		.leaflet-color-swatch { background-color: #fff; }
	</style>	
	<script>
		var map = L.map('map').setView([41.7896,-87.5996], 15),
			drawnItems = new L.FeatureGroup().addTo(map),
			editActions = [
				L.Edit.Popup.Edit,
				L.Edit.Popup.Delete,
				L.ToolbarAction.extendOptions({
					toolbarIcon: { 
						className: 'leaflet-color-picker', 
						html: '<span class="fa fa-eyedropper"></span>' 
					},
					subToolbar: new L.Toolbar({ actions: [
						L.ColorPicker.extendOptions({ color: '#db1d0f' }),
						L.ColorPicker.extendOptions({ color: '#025100' }),
						L.ColorPicker.extendOptions({ color: '#ffff00' }),
						L.ColorPicker.extendOptions({ color: '#0000ff' })
					]})
				})
			];

		L.tileLayer("http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", {
			attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'
		}).addTo(map);

		new L.DrawToolbar.Control({ 
			position: 'topleft',
			className: 'leaflet-draw-toolbar',
		}).addTo(map);

		map.on('draw:created', function(evt) {
			var	type = evt.layerType,
				layer = evt.layer;

			drawnItems.addLayer(layer);

			layer.on('click', function(event) {
				var latlng = event.latlng;

				/* Override event.latlng to open the popup just above markers. */
				if (layer instanceof L.Marker) {
					height = parseFloat(L.DomUtil.getStyle(layer._icon, 'height'));
					latlng = map.layerPointToLatLng(map
						.latLngToLayerPoint(latlng)
						.add(L.point(0, -height))
					);
				}

				new L.EditToolbar.Popup(latlng, {
					className: 'leaflet-draw-toolbar',
					actions: editActions
				}).addTo(map, layer);
			});
		});
	</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.20527210884353742, 'fraction_numerical': 0.022108843537414966, 'mean_word_length': 3.656373713380839, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7616750', 'n_tokens_mistral': 2501, 'n_tokens_neox': 2179, 'n_words': 329}