ol-contextmenu 4.1.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,24 +1,18 @@
1
1
  # OpenLayers Custom Context Menu
2
2
 
3
3
  <p align="center">
4
- <a href="https://travis-ci.org/jonataswalker/ol-contextmenu">
5
- <img src="https://travis-ci.org/jonataswalker/ol-contextmenu.svg?branch=master" alt="build status">
6
- </a>
7
- <a href="https://www.npmjs.com/package/ol-contextmenu">
8
- <img src="https://img.shields.io/npm/v/ol-contextmenu.svg"
9
- alt="npm version">
10
- </a>
11
- <a href="https://github.com/jonataswalker/ol-contextmenu/blob/master/LICENSE">
12
- <img src="https://img.shields.io/npm/l/ol-contextmenu.svg"
13
- alt="license">
14
- </a>
15
- <a href="https://david-dm.org/jonataswalker/ol-contextmenu">
16
- <img src="https://david-dm.org/jonataswalker/ol-contextmenu/status.svg"
17
- alt="dependency status">
18
- </a>
19
- <a href="https://david-dm.org/jonataswalker/ol-contextmenu">
20
- <img src="https://david-dm.org/jonataswalker/ol-contextmenu/dev-status.svg" alt="devDependency status">
21
- </a>
4
+ <a href="https://github.com/jonataswalker/ol-contextmenu/actions/workflows/test.yml">
5
+ <img src="https://github.com/jonataswalker/ol-contextmenu/actions/workflows/test.yml/badge.svg?branch=master" alt="Build Status">
6
+ </a>
7
+ <a href="https://www.npmjs.com/package/ol-contextmenu">
8
+ <img src="https://img.shields.io/npm/v/ol-contextmenu.svg" alt="npm version">
9
+ </a>
10
+ <a href="https://img.shields.io/npm/dm/ol-contextmenu">
11
+ <img alt="npm" src="https://img.shields.io/npm/dm/ol-contextmenu">
12
+ </a>
13
+ <a href="https://github.com/jonataswalker/ol-contextmenu/blob/master/LICENSE">
14
+ <img src="https://img.shields.io/npm/l/ol-contextmenu.svg" alt="license">
15
+ </a>
22
16
  </p>
23
17
 
24
18
  A `contextmenu` extension for [OpenLayers](http://openlayers.org/). **Requires** OpenLayers **v3.11.0** or higher.
@@ -26,48 +20,58 @@ A `contextmenu` extension for [OpenLayers](http://openlayers.org/). **Requires**
26
20
  ![contextmenu anim](https://raw.githubusercontent.com/jonataswalker/ol-contextmenu/screenshot/images/anim.gif)
27
21
 
28
22
  ## Demo
23
+
29
24
  You can see [here a demo](http://rawgit.com/jonataswalker/ol-contextmenu/master/examples/contextmenu.html) or [JSFiddle](https://jsfiddle.net/jonataswalker/ooxs1w5d/).
30
25
 
31
26
  ## How to use it?
27
+
32
28
  ##### NPM
29
+
33
30
  `npm install ol-contextmenu`
34
31
 
35
32
  ##### CDN Hosted - [jsDelivr](https://www.jsdelivr.com/package/npm/ol-contextmenu)
33
+
36
34
  Load CSS and Javascript:
35
+
37
36
  ```HTML
38
- <link href="https://cdn.jsdelivr.net/npm/ol-contextmenu@latest/dist/ol-contextmenu.min.css" rel="stylesheet">
37
+ <link href="https://cdn.jsdelivr.net/npm/ol-contextmenu@latest/dist/ol-contextmenu.css" rel="stylesheet">
39
38
  <script src="https://cdn.jsdelivr.net/npm/ol-contextmenu"></script>
40
39
  ```
41
40
 
42
41
  ##### CDN Hosted - UNPKG
42
+
43
43
  Load CSS and Javascript:
44
+
44
45
  ```HTML
45
- <link href="https://unpkg.com/ol-contextmenu/dist/ol-contextmenu.min.css" rel="stylesheet">
46
+ <link href="https://unpkg.com/ol-contextmenu/dist/ol-contextmenu.css" rel="stylesheet">
46
47
  <script src="https://unpkg.com/ol-contextmenu"></script>
47
48
  ```
49
+
48
50
  ##### Self hosted
51
+
49
52
  Download [latest release](https://github.com/jonataswalker/ol-contextmenu/releases/latest) and (obviously) load CSS and Javascript.
50
53
 
51
54
  ##### Instantiate with some options and add the Control
55
+
52
56
  ```javascript
53
57
  var contextmenu = new ContextMenu({
54
- width: 170,
55
- defaultItems: true, // defaultItems are (for now) Zoom In/Zoom Out
56
- items: [
57
- {
58
- text: 'Center map here',
59
- classname: 'some-style-class', // add some CSS rules
60
- callback: center // `center` is your callback function
61
- },
62
- {
63
- text: 'Add a Marker',
64
- classname: 'some-style-class', // you can add this icon with a CSS class
65
- // instead of `icon` property (see next line)
66
- icon: 'img/marker.png', // this can be relative or absolute
67
- callback: marker
68
- },
69
- '-' // this is a separator
70
- ]
58
+ width: 170,
59
+ defaultItems: true, // defaultItems are (for now) Zoom In/Zoom Out
60
+ items: [
61
+ {
62
+ text: 'Center map here',
63
+ classname: 'some-style-class', // add some CSS rules
64
+ callback: center, // `center` is your callback function
65
+ },
66
+ {
67
+ text: 'Add a Marker',
68
+ classname: 'some-style-class', // you can add this icon with a CSS class
69
+ // instead of `icon` property (see next line)
70
+ icon: 'img/marker.png', // this can be relative or absolute
71
+ callback: marker,
72
+ },
73
+ '-', // this is a separator
74
+ ],
71
75
  });
72
76
  map.addControl(contextmenu);
73
77
  ```
@@ -78,55 +82,57 @@ If you provide `items {Array}` a submenu will be created as a child of the curre
78
82
 
79
83
  ```javascript
80
84
  var all_items = [
81
- {
82
- text: 'Some Actions',
83
- items: [ // <== this is a submenu
84
- {
85
- text: 'Action 1',
86
- callback: action
87
- },
88
- {
89
- text: 'Other action',
90
- callback: action2
91
- }
92
- ]
93
- },
94
- {
95
- text: 'Add a Marker',
96
- icon: 'img/marker.png',
97
- callback: marker
98
- },
99
- '-' // this is a separator
85
+ {
86
+ text: 'Some Actions',
87
+ items: [
88
+ // <== this is a submenu
89
+ {
90
+ text: 'Action 1',
91
+ callback: action,
92
+ },
93
+ {
94
+ text: 'Other action',
95
+ callback: action2,
96
+ },
97
+ ],
98
+ },
99
+ {
100
+ text: 'Add a Marker',
101
+ icon: 'img/marker.png',
102
+ callback: marker,
103
+ },
104
+ '-', // this is a separator
100
105
  ];
101
106
  ```
102
107
 
103
108
  ##### Would you like to propagate custom data to the callback handler?
109
+
104
110
  ```javascript
105
111
  var removeMarker = function (obj) {
106
- vectorLayer.getSource().removeFeature(obj.data.marker);
112
+ vectorLayer.getSource().removeFeature(obj.data.marker);
107
113
  };
108
114
  var removeMarkerItem = {
109
- text: 'Remove this Marker',
110
- icon: 'img/marker.png',
111
- callback: removeMarker
115
+ text: 'Remove this Marker',
116
+ icon: 'img/marker.png',
117
+ callback: removeMarker,
112
118
  };
113
119
 
114
120
  var restore = false;
115
121
  contextmenu.on('open', function (evt) {
116
- var feature = map.forEachFeatureAtPixel(evt.pixel, function (ft, l) {
117
- return ft;
118
- });
119
- if (feature) {
120
- contextmenu.clear();
121
- removeMarkerItem.data = { marker: feature };
122
- contextmenu.push(removeMarkerItem);
123
- restore = true;
124
- } else if (restore) {
125
- contextmenu.clear();
126
- contextmenu.extend(contextmenu_items);
127
- contextmenu.extend(contextmenu.getDefaultItems());
128
- restore = false;
129
- }
122
+ var feature = map.forEachFeatureAtPixel(evt.pixel, function (ft, l) {
123
+ return ft;
124
+ });
125
+ if (feature) {
126
+ contextmenu.clear();
127
+ removeMarkerItem.data = { marker: feature };
128
+ contextmenu.push(removeMarkerItem);
129
+ restore = true;
130
+ } else if (restore) {
131
+ contextmenu.clear();
132
+ contextmenu.extend(contextmenu_items);
133
+ contextmenu.extend(contextmenu.getDefaultItems());
134
+ restore = false;
135
+ }
130
136
  });
131
137
  ```
132
138
 
@@ -137,10 +143,11 @@ contextmenu.on('open', function (evt) {
137
143
  #### `new ContextMenu(options)`
138
144
 
139
145
  ###### `options` is an object with the following possible properties:
140
- * `eventType`: `contextmenu`; The listening event type (You could use `'click'`, `'dblclick'`)
141
- * `defaultItems`: `true`; Whether the default items (which are: Zoom In/Out) are enabled
142
- * `width`: `150`; The menu's width
143
- * `items`: `[]`; An array of object|string
146
+
147
+ - `eventType`: `contextmenu`; The listening event type (You could use `'click'`, `'dblclick'`)
148
+ - `defaultItems`: `true`; Whether the default items (which are: Zoom In/Out) are enabled
149
+ - `width`: `150`; The menu's width
150
+ - `items`: `[]`; An array of object|string
144
151
 
145
152
  ## Methods
146
153
 
@@ -159,17 +166,18 @@ Close the menu programmatically.
159
166
  Add items to the menu. This pushes each item in the provided array to the end of the menu.
160
167
 
161
168
  Example:
169
+
162
170
  ```js
163
171
  var contextmenu = new ContextMenu();
164
172
  map.addControl(contextmenu);
165
173
 
166
174
  var add_later = [
167
- '-', // this is a separator
168
- {
169
- text: 'Add a Marker',
170
- icon: 'img/marker.png',
171
- callback: marker
172
- }
175
+ '-', // this is a separator
176
+ {
177
+ text: 'Add a Marker',
178
+ icon: 'img/marker.png',
179
+ callback: marker,
180
+ },
173
181
  ];
174
182
  contextmenu.extend(add_later);
175
183
  ```
@@ -202,36 +210,36 @@ Whether the menu is open.
202
210
 
203
211
  Update menu's position.
204
212
 
205
-
206
213
  ## Events
207
214
 
208
215
  #### If you want to disable this plugin under certain circumstances, listen to `beforeopen`
209
216
 
210
217
  ```javascript
211
218
  contextmenu.on('beforeopen', function (evt) {
212
- var feature = map.forEachFeatureAtPixel(evt.pixel, function (ft, l) {
213
- return ft;
214
- });
215
-
216
- if (feature) { // open only on features
217
- contextmenu.enable();
218
- } else {
219
- contextmenu.disable();
220
- }
219
+ var feature = map.forEachFeatureAtPixel(evt.pixel, function (ft, l) {
220
+ return ft;
221
+ });
222
+
223
+ if (feature) {
224
+ // open only on features
225
+ contextmenu.enable();
226
+ } else {
227
+ contextmenu.disable();
228
+ }
221
229
  });
222
230
  ```
223
231
 
224
232
  #### Listen and make some changes when context menu opens
225
233
 
226
234
  ```javascript
227
- contextmenu.on('open', function(evt){
228
- var feature = map.forEachFeatureAtPixel(evt.pixel, function (ft, l) {
229
- return ft;
230
- });
231
-
232
- if (feature) {
233
- // add some other items to the menu
234
- }
235
+ contextmenu.on('open', function (evt) {
236
+ var feature = map.forEachFeatureAtPixel(evt.pixel, function (ft, l) {
237
+ return ft;
238
+ });
239
+
240
+ if (feature) {
241
+ // add some other items to the menu
242
+ }
235
243
  });
236
244
  ```
237
245
 
@@ -239,6 +247,6 @@ contextmenu.on('open', function(evt){
239
247
 
240
248
  ```javascript
241
249
  contextmenu.on('close', function (evt) {
242
- // it's upon you
250
+ // it's upon you
243
251
  });
244
252
  ```
@@ -0,0 +1,14 @@
1
+ import { SingleItem, Options } from './types';
2
+ export declare const DEFAULT_OPTIONS: Options;
3
+ export declare const CSS_CLASSES: {
4
+ namespace: string;
5
+ container: string;
6
+ separator: string;
7
+ submenu: string;
8
+ hidden: string;
9
+ icon: string;
10
+ zoomIn: string;
11
+ zoomOut: string;
12
+ unselectable: string;
13
+ };
14
+ export declare const DEFAULT_ITEMS: SingleItem[];
@@ -0,0 +1,3 @@
1
+ import { TinyEmitter } from 'tiny-emitter';
2
+ declare const emitter: TinyEmitter;
3
+ export default emitter;
@@ -0,0 +1,5 @@
1
+ import { Item } from '../types';
2
+ export declare function createFragment(html: string): DocumentFragment;
3
+ export declare function getLineHeight(container: HTMLDivElement): number;
4
+ export declare function addMenuEntry(parentNode: HTMLUListElement, item: Item, isSubmenu?: boolean): HTMLLIElement;
5
+ export declare function addMenuEntries(container: HTMLUListElement, items: Item[], menuWidth: number): void;
package/dist/main.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ import type { Pixel } from 'ol/pixel';
2
+ import type { Coordinate } from 'ol/coordinate';
3
+ import OlMap from 'ol/Map';
4
+ import Control from 'ol/control/Control';
5
+ import { Item, MenuEntry, Options } from './types';
6
+ export default class ContextMenu extends Control {
7
+ protected map: OlMap;
8
+ protected container: HTMLDivElement;
9
+ protected coordinate: Coordinate;
10
+ protected pixel: Pixel;
11
+ protected contextMenuEventListener: (evt: MouseEvent) => void;
12
+ protected entryCallbackEventListener: (evt: MouseEvent) => void;
13
+ protected mapMoveListener: () => void;
14
+ protected lineHeight: number;
15
+ protected disabled: boolean;
16
+ protected opened: boolean;
17
+ protected items: Item[];
18
+ protected menuEntries: Map<string, MenuEntry>;
19
+ options: Options;
20
+ constructor(opts?: Partial<Options>);
21
+ clear(): void;
22
+ enable(): void;
23
+ disable(): void;
24
+ getDefaultItems(): import("./types").SingleItem[];
25
+ countItems(): number;
26
+ extend(items: Item[]): void;
27
+ closeMenu(): void;
28
+ isOpen(): boolean;
29
+ updatePosition(pixel: Pixel): void;
30
+ pop(): void;
31
+ shift(): void;
32
+ push(item: Item): void;
33
+ setMap(map: OlMap): void;
34
+ protected removeListeners(): void;
35
+ protected removeMenuEntry(id: string): void;
36
+ protected handleContextMenu(evt: MouseEvent): void;
37
+ protected openMenu(): void;
38
+ protected getMenuEntriesLength(): number;
39
+ protected positionContainer(): void;
40
+ protected handleMapMove(): void;
41
+ protected handleEntryCallback(evt: MouseEvent): void;
42
+ protected handleAddMenuEntry(item: MenuEntry, element: HTMLLIElement): void;
43
+ }
@@ -1,109 +1 @@
1
-
2
- /*!
3
- * ol-contextmenu - v4.1.0
4
- * https://github.com/jonataswalker/ol-contextmenu
5
- * Built: Sat Aug 15 2020 10:43:26 GMT-0300 (Brasilia Standard Time)
6
- */
7
- .ol-ctx-menu-container {
8
- position: absolute;
9
- padding: 8px;
10
- background: #fff;
11
- color: #222;
12
- font-size: 13px;
13
- border-radius: 5px;
14
- box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
15
- box-sizing: border-box;
16
- }
17
- .ol-ctx-menu-container div, .ol-ctx-menu-container span, .ol-ctx-menu-container a, .ol-ctx-menu-container img, .ol-ctx-menu-container ul, .ol-ctx-menu-container li {
18
- margin: 0;
19
- padding: 0;
20
- border: 0;
21
- font: inherit;
22
- font-size: 100%;
23
- vertical-align: baseline;
24
- }
25
- .ol-ctx-menu-container a img {
26
- border: none;
27
- }
28
- .ol-ctx-menu-container *,
29
- .ol-ctx-menu-container *::before,
30
- .ol-ctx-menu-container *::after {
31
- box-sizing: inherit;
32
- }
33
- .ol-ctx-menu-container.ol-ctx-menu-hidden {
34
- opacity: 0;
35
- visibility: hidden;
36
- transition: visibility 0s linear 300ms, opacity 300ms;
37
- }
38
- .ol-ctx-menu-container ul {
39
- list-style: none;
40
- }
41
- .ol-ctx-menu-container li {
42
- position: relative;
43
- line-height: 20px;
44
- padding: 2px 5px;
45
- }
46
- .ol-ctx-menu-container li:not(.ol-ctx-menu-separator):hover {
47
- cursor: pointer;
48
- background-color: #333;
49
- color: #eee;
50
- }
51
- .ol-ctx-menu-container li.ol-ctx-menu-submenu .ol-ctx-menu-container {
52
- border: 1px solid #eee;
53
- padding: 8px;
54
- top: 0;
55
- opacity: 0;
56
- visibility: hidden;
57
- transition: visibility 0s linear 300ms, opacity 300ms;
58
- }
59
- .ol-ctx-menu-container li.ol-ctx-menu-submenu:hover .ol-ctx-menu-container {
60
- opacity: 1;
61
- visibility: visible;
62
- transition-delay: 0s;
63
- }
64
- .ol-ctx-menu-container li.ol-ctx-menu-submenu::after {
65
- position: absolute;
66
- top: 7px;
67
- right: 10px;
68
- content: "";
69
- display: inline-block;
70
- width: 0.6em;
71
- height: 0.6em;
72
- border-right: 0.3em solid #222;
73
- border-top: 0.3em solid #222;
74
- transform: rotate(45deg);
75
- }
76
- .ol-ctx-menu-container li.ol-ctx-menu-submenu:hover::after {
77
- border-color: #eee;
78
- }
79
- .ol-ctx-menu-container li.ol-ctx-menu-separator {
80
- padding: 0;
81
- }
82
- .ol-ctx-menu-container li.ol-ctx-menu-separator hr {
83
- border: 0;
84
- height: 1px;
85
- background-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
86
- }
87
-
88
- .ol-ctx-menu-icon {
89
- text-indent: 20px;
90
- background-size: 20px auto;
91
- background-repeat: no-repeat;
92
- background-position: left center;
93
- }
94
-
95
- .ol-ctx-menu-zoom-in {
96
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABaUlEQVQ4T72U7VHCQBCGn90GtAMuNGCswFiBWIFQgWMFxg6wArECsQKhArEBiB1Qwa1zgQn5IAYcxv13k71n3919L8KJQ07M47+BzgG9TRfZ/JBuWhS6BJFHRJICYrZGZIz3z5Ct2+B7gG6I6kt+wewdkQVwjtkAkR5mC8yu26A1oItR/cTsOweQBdgutD8G7jGm2PJ2n8oqUKIpIjd4HxTM8gvaT/F+AlmWnyWaIXKF95eNguFzTYFhNsdWu9kFgFlaFMANUH3D8wDLoLgSTSD2il8NCe2ZXQBxWDGwxmyUzzOMBZ7wy7Qb2K0wQfXjMOBuhlFpZtNty5sFaTQBuTusZdymeqs1SpYKcO9HkE3KbTd9WFijMHJQ5hBNEAYNq5Qd0dhyke0GiE4QzjqfW23mHT8Hl4DG4Lce3FPE7AtbBSdsbNqpoJLgYkRnNeUV+xwJDHTnUEkxHGbhBXUs5TjJjew/KPy94g+NRaIVRYmMXwAAAABJRU5ErkJggg==");
97
- }
98
-
99
- .ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-in {
100
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABc0lEQVQ4T71U21ECQRDsJgGdvQDECMQIxAjECMQILCPwzAAjECIQI0AiEDPQAPaWCBhrcKHuCUcV5f7dY3v6tUscefHIePhfwBBCF8CZqRCReRs1tQxDCH1VfQLQz4EsSY4AvIjIsgm8AhhCGKrqa9zwrqoLAKckB5HtguR1E2gBMITQU9VPAD8GICIGtl3e+xHJBwBT59xtHcsCYJZlUwA3kcGHbfDep51OZywi3/acZZm9vyJ5WR5o38uACmDunNt6ZwAkUxFZDwghDFT1jeSjiJinhVUBVNVJkiTDKO8CQA+AsbNQ7s1Ps0VVn5MkSfcCtmBoDZi1Bdx4eJ7zbBolrwPy3o9J3rWSHPs3A1BbjVKlYBaIyDgvu9LDXDU2RTZmXVW1oKyLxRD+OrkOrJLy5mVM0iaftDhuhVbsvBzMglzKUNW6IV/OOWtCM8MmVvEkmbwt83LaB19fdgOtVquUZJeknaDdobTwbOcvBzPcN/AXH1DFFWP7u9oAAAAASUVORK5CYII=");
101
- }
102
-
103
- .ol-ctx-menu-zoom-out {
104
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABU0lEQVQ4T72U7VECMRRFz3sNaAdkacC1AtcKxApcKnCsQOwAK3CtQKxAqEBsANYOqCDPyTIC+8WCw5jfybn33dxEOPGSE/P4b6BzQG89RT47ZJoWhy5B5BGRZAMxWyEyxvtnyFdt8AagS1F9KQ6YvSMyB84xGyDSw2yO2XUbtAJ0MaqfmH0XAPIA2y7tj4F7jAm2uG1yWQZKNEHkBu+Dg2njWBJNEbnC+8uaIFRuWfuG2QxbbrOrUd0A1Tc8D7AIjkur7DAAsVf8MiWMZ3ZR2m02LPIMscATfjHqBnY7TFD9OAy4zTCCPG/MUKMM5O6wkXFr9dZq7FQqqHk/hDzbFa73cFONTZFDdRyiCcKg5rrSiLaXkiI6RjjrfG6VzDs+B5eAxuDXeYpmNRGzL2wZ/wof+du4GNFpBVqqz5HA4MM5VEYYDrOs+1I6Q9u/4Q8O9wN/AGgWjBVqQjjgAAAAAElFTkSuQmCC");
105
- }
106
-
107
- .ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-out {
108
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABYklEQVQ4T72U4VHCQBCF36tA91KAWIFYgViBWIFYgWMFYgdYgVCBWAFSgdiBFpAsFWSdxcDkQoBkhnF/ZjbfvX377ogjF4/Mw/8CVbUD4MynEJF5k2lqFapqz8yeAPRKkCXJEYAXEVnugm8BVXVgZq/FD+9mtgBwSrJfqF2QvN4FjYCq2jWzTwA/DhARh20qTdMRyQcA0xDCbZ3KCJhl2RTATaHgo+6HLMv8+xXJy+qB3l8FGoB5CKHsXcRV1b6ZvZF8FBH3NKotoJlNkiQZFONdlLtJ3rufbouZPSdJMjwIbKDQEzBrClx7eC4i33Uepmk6JnnXaOQifzMAtdGoRApugYiMI1uqKkrRWAfZo9MxM1+UZzFewl8mN4nYdVM83L7BkwbXLUrF3sfBLQDQBbDy08x8vOohXyEE71lVq9emuEk+3gZa3XYroCvwFyjP8yHJDsnxwaU08GxvS2uFhw78BbzWrxXgMbsHAAAAAElFTkSuQmCC");
109
- }
1
+ .ol-ctx-menu-container{position:absolute;padding:8px;background:#fff;color:#222;font-size:13px;border-radius:5px;box-shadow:#0003 3px 3px 5px;box-sizing:border-box}.ol-ctx-menu-container div,.ol-ctx-menu-container span,.ol-ctx-menu-container a,.ol-ctx-menu-container img,.ol-ctx-menu-container ul,.ol-ctx-menu-container li{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.ol-ctx-menu-container a img{border:none}.ol-ctx-menu-container *,.ol-ctx-menu-container *:before,.ol-ctx-menu-container *:after{box-sizing:inherit}.ol-ctx-menu-container.ol-ctx-menu-hidden{opacity:0;visibility:hidden;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container ul{list-style:none}.ol-ctx-menu-container li{position:relative;line-height:20px;padding:2px 5px;white-space:nowrap}.ol-ctx-menu-container li:not(.ol-ctx-menu-separator):hover{cursor:pointer;background-color:#333;color:#eee}.ol-ctx-menu-container li.ol-ctx-menu-submenu .ol-ctx-menu-container{border:1px solid #eee;padding:8px;top:0;opacity:0;visibility:hidden;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container li.ol-ctx-menu-submenu:hover>.ol-ctx-menu-container{opacity:1;visibility:visible;transition-delay:0s}.ol-ctx-menu-container li.ol-ctx-menu-submenu:after{position:absolute;top:7px;right:10px;content:"";display:inline-block;width:.6em;height:.6em;border-right:.3em solid #222;border-top:.3em solid #222;transform:rotate(45deg)}.ol-ctx-menu-container li.ol-ctx-menu-submenu:hover:after{border-color:#eee}.ol-ctx-menu-container li.ol-ctx-menu-separator{padding:0}.ol-ctx-menu-container li.ol-ctx-menu-separator hr{border:0;height:1px;background-image:linear-gradient(to left,rgba(0,0,0,0),rgba(0,0,0,.75),rgba(0,0,0,0))}.ol-ctx-menu-icon{text-indent:20px;background-size:20px auto;background-repeat:no-repeat;background-position:left center}.ol-ctx-menu-zoom-in{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABaUlEQVQ4T72U7VHCQBCGn90GtAMuNGCswFiBWIFQgWMFxg6wArECsQKhArEBiB1Qwa1zgQn5IAYcxv13k71n3919L8KJQ07M47+BzgG9TRfZ/JBuWhS6BJFHRJICYrZGZIz3z5Ct2+B7gG6I6kt+wewdkQVwjtkAkR5mC8yu26A1oItR/cTsOweQBdgutD8G7jGm2PJ2n8oqUKIpIjd4HxTM8gvaT/F+AlmWnyWaIXKF95eNguFzTYFhNsdWu9kFgFlaFMANUH3D8wDLoLgSTSD2il8NCe2ZXQBxWDGwxmyUzzOMBZ7wy7Qb2K0wQfXjMOBuhlFpZtNty5sFaTQBuTusZdymeqs1SpYKcO9HkE3KbTd9WFijMHJQ5hBNEAYNq5Qd0dhyke0GiE4QzjqfW23mHT8Hl4DG4Lce3FPE7AtbBSdsbNqpoJLgYkRnNeUV+xwJDHTnUEkxHGbhBXUs5TjJjew/KPy94g+NRaIVRYmMXwAAAABJRU5ErkJggg==)}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-in{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABc0lEQVQ4T71U21ECQRDsJgGdvQDECMQIxAjECMQILCPwzAAjECIQI0AiEDPQAPaWCBhrcKHuCUcV5f7dY3v6tUscefHIePhfwBBCF8CZqRCReRs1tQxDCH1VfQLQz4EsSY4AvIjIsgm8AhhCGKrqa9zwrqoLAKckB5HtguR1E2gBMITQU9VPAD8GICIGtl3e+xHJBwBT59xtHcsCYJZlUwA3kcGHbfDep51OZywi3/acZZm9vyJ5WR5o38uACmDunNt6ZwAkUxFZDwghDFT1jeSjiJinhVUBVNVJkiTDKO8CQA+AsbNQ7s1Ps0VVn5MkSfcCtmBoDZi1Bdx4eJ7zbBolrwPy3o9J3rWSHPs3A1BbjVKlYBaIyDgvu9LDXDU2RTZmXVW1oKyLxRD+OrkOrJLy5mVM0iaftDhuhVbsvBzMglzKUNW6IV/OOWtCM8MmVvEkmbwt83LaB19fdgOtVquUZJeknaDdobTwbOcvBzPcN/AXH1DFFWP7u9oAAAAASUVORK5CYII=)}.ol-ctx-menu-zoom-out{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABU0lEQVQ4T72U7VECMRRFz3sNaAdkacC1AtcKxApcKnCsQOwAK3CtQKxAqEBsANYOqCDPyTIC+8WCw5jfybn33dxEOPGSE/P4b6BzQG89RT47ZJoWhy5B5BGRZAMxWyEyxvtnyFdt8AagS1F9KQ6YvSMyB84xGyDSw2yO2XUbtAJ0MaqfmH0XAPIA2y7tj4F7jAm2uG1yWQZKNEHkBu+Dg2njWBJNEbnC+8uaIFRuWfuG2QxbbrOrUd0A1Tc8D7AIjkur7DAAsVf8MiWMZ3ZR2m02LPIMscATfjHqBnY7TFD9OAy4zTCCPG/MUKMM5O6wkXFr9dZq7FQqqHk/hDzbFa73cFONTZFDdRyiCcKg5rrSiLaXkiI6RjjrfG6VzDs+B5eAxuDXeYpmNRGzL2wZ/wof+du4GNFpBVqqz5HA4MM5VEYYDrOs+1I6Q9u/4Q8O9wN/AGgWjBVqQjjgAAAAAElFTkSuQmCC)}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-out{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABYklEQVQ4T72U4VHCQBCF36tA91KAWIFYgViBWIFYgWMFYgdYgVCBWAFSgdiBFpAsFWSdxcDkQoBkhnF/ZjbfvX377ogjF4/Mw/8CVbUD4MynEJF5k2lqFapqz8yeAPRKkCXJEYAXEVnugm8BVXVgZq/FD+9mtgBwSrJfqF2QvN4FjYCq2jWzTwA/DhARh20qTdMRyQcA0xDCbZ3KCJhl2RTATaHgo+6HLMv8+xXJy+qB3l8FGoB5CKHsXcRV1b6ZvZF8FBH3NKotoJlNkiQZFONdlLtJ3rufbouZPSdJMjwIbKDQEzBrClx7eC4i33Uepmk6JnnXaOQifzMAtdGoRApugYiMI1uqKkrRWAfZo9MxM1+UZzFewl8mN4nYdVM83L7BkwbXLUrF3sfBLQDQBbDy08x8vOohXyEE71lVq9emuEk+3gZa3XYroCvwFyjP8yHJDsnxwaU08GxvS2uFhw78BbzWrxXgMbsHAAAAAElFTkSuQmCC)}
@@ -0,0 +1,3 @@
1
+ export * from './main'
2
+ import ContextMenu from './main'
3
+ export default ContextMenu