{"id":21539864,"url":"https://github.com/raruto/leaflet-gesture-handling","last_synced_at":"2025-04-10T03:26:38.302Z","repository":{"id":34943808,"uuid":"192984020","full_name":"Raruto/leaflet-gesture-handling","owner":"Raruto","description":"Leaflet plugin that allows to prevent default map scroll/touch behaviours","archived":false,"fork":false,"pushed_at":"2023-03-01T16:37:20.000Z","size":452,"stargazers_count":12,"open_issues_count":4,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T13:17:55.517Z","etag":null,"topics":["fingers","gesture-handling","leaflet","maps","prevent","scroll","touch","zoom"],"latest_commit_sha":null,"homepage":"https://raruto.github.io/leaflet-gesture-handling","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Raruto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-20T20:33:24.000Z","updated_at":"2025-02-20T08:39:54.000Z","dependencies_parsed_at":"2024-06-18T22:41:22.076Z","dependency_job_id":"0663d8ad-831c-44cd-bd7b-d9de7f8d9052","html_url":"https://github.com/Raruto/leaflet-gesture-handling","commit_stats":{"total_commits":64,"total_committers":7,"mean_commits":9.142857142857142,"dds":0.484375,"last_synced_commit":"d2e0a39b5709954ff49c8ffb29b11a092b15be8b"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-gesture-handling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-gesture-handling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-gesture-handling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fleaflet-gesture-handling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raruto","download_url":"https://codeload.github.com/Raruto/leaflet-gesture-handling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248150057,"owners_count":21055851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fingers","gesture-handling","leaflet","maps","prevent","scroll","touch","zoom"],"created_at":"2024-11-24T04:16:35.888Z","updated_at":"2025-04-10T03:26:38.264Z","avatar_url":"https://github.com/Raruto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# leaflet-gesture-handling.js\n\nA Leaflet plugin that allows to prevent default map scroll/touch behaviours.\n\n\n_For a working example see [demo](https://raruto.github.io/leaflet-gesture-handling/examples/leaflet-gesture-handling.html)_\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://raruto.github.io/leaflet-gesture-handling/examples/leaflet-gesture-handling.html\"\u003e\u003cimg src=\"https://raruto.github.io/img/leaflet-gesture-handling.png\" alt=\"Ctrl + scroll to zoom the map\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n---\n\n\u003cblockquote\u003e\n    \u003cp align=\"center\"\u003e\n        \u003cem\u003eInitially based on the \u003ca href=\"https://github.com/elmarquis/Leaflet.GestureHandling\"\u003ework\u003c/a\u003e of \u003cstrong\u003eelmarquis\u003c/strong\u003e\u003c/em\u003e\n    \u003c/p\u003e\n\u003c/blockquote\u003e\n\n---\n\n## How to use\n\n1. **include CSS \u0026 JavaScript**\n    ```html\n    \u003chead\u003e\n    ...\n    \u003cstyle\u003e html, body, #map { height: 100%; width: 100%; padding: 0; margin: 0; } \u003c/style\u003e\n    \u003c!-- Leaflet (JS/CSS) --\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.css\" /\u003e\n    \u003cscript src=\"https://unpkg.com/leaflet@1.3.4/dist/leaflet.js\"\u003e\u003c/script\u003e\n    \u003c!-- leaflet-gesture-handling --\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/@raruto/leaflet-gesture-handling@latest/dist/leaflet-gesture-handling.min.css\" type=\"text/css\"\u003e\n    \u003cscript src=\"https://unpkg.com/@raruto/leaflet-gesture-handling@latest/dist/leaflet-gesture-handling.min.js\"\u003e\u003c/script\u003e\n    ...\n    \u003c/head\u003e\n    ```\n2. **choose the div container used for the slippy map**\n    ```html\n    \u003cbody\u003e\n    ...\n    \u003cdiv id=\"map\"\u003e\u003c/div\u003e\n    ...\n    \u003c/body\u003e\n    ```\n3. **create your first simple “leaflet-gesture-handling” slippy map**\n    ```html\n    \u003cscript\u003e\n      ...\n      var map = new L.Map('map', {\n        center: [41.4583, 12.7059],\n        zoom: 5,\n        gestureHandling: true,\n        gestureHandlingOptions: { // OPTIONAL\n          // text: {\n          //   touch: \"Hey bro, use two fingers to move the map\",\n          //   scroll: \"Hey bro, use ctrl + scroll to zoom the map\",\n          //   scrollMac: \"Hey bro, use \\u2318 + scroll to zoom the map\"\n          // },\n          // locale: 'en', // set language of the warning message.\n          // duration: 5000 // set time in ms before the message should disappear.\n        }\n      });\n      ...\n    \u003c/script\u003e\n    ```\n_Related: [Leaflet-UI presets](https://github.com/raruto/leaflet-ui)_\n\n---\n\n**Compatibile with:** leaflet@1.3.4\n\n---\n\n**Contributors:** [Elmarquis](https://github.com/elmarquis/Leaflet.GestureHandling), [Raruto](https://github.com/Raruto/leaflet-gesture-handling)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-gesture-handling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraruto%2Fleaflet-gesture-handling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fleaflet-gesture-handling/lists"}