-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
302 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,25 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta name="referrer" content="no-referrer"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> | ||
<title>Leaflet.DoubleTouchDragZoom</title> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | ||
</head> | ||
<body> | ||
<style> | ||
.leaflet-double-touch { | ||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
} | ||
.leaflet-double-touch-drag { | ||
cursor: move; | ||
cursor: -webkit-grabbing; | ||
cursor: -moz-grabbing; | ||
cursor: row-resize; | ||
} | ||
</style> | ||
<div id="map" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | ||
<script src="../src/leaflet-double-touch-drag-zoom.js"></script> | ||
<script> | ||
var map = L.map('map', { | ||
center: [48.6726, 19.6994], | ||
zoom: 7, | ||
zoomControl: true, | ||
doubleTouchDragZoom: true | ||
}); | ||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' | ||
}).addTo(map); | ||
</script> | ||
</body> | ||
</html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta name="referrer" content="no-referrer"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> | ||
<title>Leaflet.DoubleTouchDragZoom</title> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="../src/leaflet-double-touch-drag-zoom.css" /> | ||
</head> | ||
<body> | ||
<div id="map" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | ||
<script src="../src/leaflet-double-touch-drag-zoom.js"></script> | ||
<script> | ||
var map = L.map('map', { | ||
center: [48.6726, 19.6994], | ||
zoom: 7, | ||
doubleTouchDragZoom: true | ||
}); | ||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' | ||
}).addTo(map); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "@petoc/leafet-double-touch-drag-zoom", | ||
"version": "1.0.0", | ||
"author": "Peter C.", | ||
"license": "MIT", | ||
"description": "Leaflet plugin for one finger zoom.", | ||
"keywords": [ | ||
"leaflet", | ||
"plugin", | ||
"zoom" | ||
], | ||
"files": [ | ||
"src" | ||
], | ||
"peerDependencies": { | ||
"leaflet": "^1.0.0" | ||
}, | ||
"main": "src/leaflet-double-touch-drag-zoom.js", | ||
"types": "src/leaflet-double-touch-drag-zoom.d.ts", | ||
"homepage": "https://github.com/petoc/Leaflet.DoubleTouchDragZoom#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/petoc/Leaflet.DoubleTouchDragZoom.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/petoc/Leaflet.DoubleTouchDragZoom/issues" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.leaflet-double-touch { | ||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
} | ||
.leaflet-double-touch-drag { | ||
cursor: move; | ||
cursor: -webkit-grabbing; | ||
cursor: -moz-grabbing; | ||
cursor: row-resize; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as L from 'leaflet'; | ||
|
||
declare module 'leaflet' { | ||
interface MapOptions { | ||
doubleTouchDragZoom?: boolean | ||
doubleTouchDragZoomDelay?: number | ||
doubleTouchDragZoomInvert?: boolean | ||
doubleTouchDragZoomScaleFactor?: number | ||
} | ||
} |
Oops, something went wrong.