Skip to content

Commit

Permalink
Merge pull request #104 from jonataswalker/fix-grammar
Browse files Browse the repository at this point in the history
Fix bad english `isOpened`
  • Loading branch information
jonataswalker authored Jan 27, 2017
2 parents 9b87413 + ee580c7 commit 7f2cbb6
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 41 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ map.addControl(contextmenu);

##### You can add a (nested) submenu like this:

If you provide `items {Array}` a submenu will be created as a child of the current item.
If you provide `items {Array}` a submenu will be created as a child of the current item.

```javascript
var all_items = [
Expand Down Expand Up @@ -190,9 +190,9 @@ Remove the last item of the menu.

Get an array of default items.

#### contextmenu.isOpened()
#### contextmenu.isOpen()

Whether the menu is opened.
Whether the menu is open.

#### contextmenu.updatePosition(pixel)

Expand Down
15 changes: 10 additions & 5 deletions build/ol3-contextmenu-debug.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
/*!
* ol3-contextmenu - v2.4.1
* Custom Context Menu for Openlayers 3
* https://github.com/jonataswalker/ol3-contextmenu
* Version: v2.4.0
* Built: 2016-11-17T16:44:59-02:00
* Built: Fri Jan 27 2017 07:46:19 GMT-0200 (BRST)
*/

(function (global, factory) {
Expand Down Expand Up @@ -812,9 +812,14 @@ var Base = (function (superclass) {
};

/**
* Am I opened?.
* bad english
* keep it (for a while) to not break changes
*/
Base.prototype.isOpened = function isOpened () {
return this.isOpen();
};

Base.prototype.isOpen = function isOpen () {
return this.Internal.opened;
};

Expand All @@ -823,7 +828,7 @@ var Base = (function (superclass) {
*/
Base.prototype.updatePosition = function updatePosition (pixel) {
utils.assert(Array.isArray(pixel), '@param `pixel` should be an Array.');
if (this.isOpened()) {
if (this.isOpen()) {
this.Internal.positionContainer(pixel);
}
};
Expand Down
26 changes: 10 additions & 16 deletions build/ol3-contextmenu.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/**
/*!
* ol3-contextmenu - v2.4.1
* Custom Context Menu for Openlayers 3
* https://github.com/jonataswalker/ol3-contextmenu
* Version: v2.4.0
* Built: 2016-11-17T16:44:59-02:00
* Built: Fri Jan 27 2017 07:46:22 GMT-0200 (BRST)
*/

.ol-ctx-menu-container {
position: absolute;
padding: 8px;
Expand Down Expand Up @@ -38,7 +37,7 @@
position: relative;
line-height: 20px;
padding: 2px 5px; }
.ol-ctx-menu-container li:not(.ol-ctx-menu-separator):hover {
.ol-ctx-menu-container li:not(.ol-ctx-menu-separator):hover {
cursor: pointer;
background-color: #333;
color: #eee; }
Expand Down Expand Up @@ -71,26 +70,21 @@
border-color: #eee; }
.ol-ctx-menu-container li.ol-ctx-menu-separator {
padding: 0; }
.ol-ctx-menu-container li.ol-ctx-menu-separator hr {
.ol-ctx-menu-container li.ol-ctx-menu-separator hr {
border: 0;
height: 1px;
background-image: -webkit-linear-gradient(right, transparent, rgba(0, 0, 0, 0.75), transparent);
background-image: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.75), transparent); }

.ol-ctx-menu-icon {
.ol-ctx-menu-icon {
text-indent: 20px;
background-size: 20px auto;
background-repeat: no-repeat;
background-position: left center; }

.ol-ctx-menu-zoom-in {
.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 {
.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 {
.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 {
.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"); }
10 changes: 5 additions & 5 deletions build/ol3-contextmenu.js

Large diffs are not rendered by default.

Loading

0 comments on commit 7f2cbb6

Please sign in to comment.