Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge updates #143

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
*.DS_Store
*.DS_Store
.npmrc
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Leaflet.contextmenu
[![CDNJS](https://img.shields.io/cdnjs/v/leaflet-contextmenu.svg)](https://cdnjs.com/libraries/leaflet-contextmenu)
[![npm](https://img.shields.io/npm/v/leaflet-contextmenu.svg)](https://www.npmjs.com/package/leaflet-contextmenu)
[![Bower](https://img.shields.io/bower/v/leaflet.contextmenu.svg)](https://libraries.io/bower/Leaflet.contextmenu)
[![npm](https://img.shields.io/npm/v/leaflet-contextmenu-bootstrap.svg)](https://www.npmjs.com/package/leaflet-contextmenu-bootstrap)

A context menu for Leaflet. See the [demo](http://aratcliffe.github.io/Leaflet.contextmenu/examples/index.html).
A context menu for Leaflet based on Bootstrap dropdowns. See the [demo](http://gunyakov.github.io/Leaflet.contextmenu/examples/index.html).

Now supporting Leaflet 1.0
## Updated to use Bootstrap dropdown CSS style

##Find bug. When activate map menu together with polygon menu, callback functions dont receive relatedTarget object.

##Multi level bootstrap dropdowns supported

Full compatible with Leaflet 1.7.*

## Usage
The context menu is implemented as a map interaction handler. To use the plugin include the script and enable using the map `contextmenu` option.
Expand Down Expand Up @@ -85,6 +89,7 @@ L.marker(ll, {
| retinaIconCls | String | `undefined` | A CSS class which sets the background image for a retina version of the icon (exclusive of the `retinaIcon` option).
| callback | Function | `undefined` | A callback function to be invoked when the menu item is clicked. The callback is passed an object with properties identifying the location the menu was opened at: `latlng`, `layerPoint` and `containerPoint`.
| context | Object | The map | The scope the callback will be executed in.
| data| Any | `undefined` | Data whitch be sended to callback function.
| disabled | Bool | `false` | If `true` the menu item will initially be in a disabled state and will not respond to click events.
| separator | Bool | `undefined` | If `true` a separator will be created instead of a menu item.
| hideOnSelect | Bool | `true` | If `true` the context menu will be automatically hidden when a menu item is selected
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "leaflet.contextmenu",
"homepage": "https://github.com/aratcliffe/Leaflet.contextmenu",
"description": "A context menu for Leaflet",
"main": ["dist/leaflet.contextmenu.js", "dist/leaflet.contextmenu.css"],
"homepage": "https://github.com/gunyakov/Leaflet.contextmenu",
"description": "A context menu for Leaflet with Bootstrap CSS and Bootstrap Icons support",
"main": ["dist/leaflet.contextmenu.js"],
"keywords": [
"gis"
],
Expand Down
54 changes: 0 additions & 54 deletions dist/leaflet.contextmenu.css

This file was deleted.

Loading