mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-12-08 21:26:14 +00:00
Signed-off-by: Jon Koops <jonkoops@gmail.com> Co-authored-by: Florian Bischof <design.falke@gmail.com>
32 lines
998 B
HTML
32 lines
998 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Leaflet debug page - Text Selection</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
|
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
|
<link rel="stylesheet" href="../css/screen.css" />
|
|
<script type="importmap">
|
|
{
|
|
"imports": {
|
|
"leaflet": "../../dist/leaflet-src.js"
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<button id="disable" type="button">Disable text selection</button>
|
|
<button id="enable" type="button">Enable text selection</button>
|
|
<p>The quick brown fox jumps over the lazy dog.</p>
|
|
<script type="module">
|
|
import {DomUtil} from 'leaflet';
|
|
|
|
const disableBtn = document.getElementById('disable');
|
|
const enableBtn = document.getElementById('enable');
|
|
|
|
disableBtn.addEventListener('click', () => DomUtil.disableTextSelection());
|
|
enableBtn.addEventListener('click', () => DomUtil.enableTextSelection());
|
|
</script>
|
|
</body>
|
|
</html>
|