loleaflet: Check boxes against checked items in context menu

Change-Id: I1a51fec67ba79dc2e82cccb54731bfabb9731470
This commit is contained in:
Pranav Kant
2016-12-08 21:58:22 +05:30
parent 4c2e59c1f2
commit 33ce6f38e4
2 changed files with 11 additions and 2 deletions

View File

@ -57,3 +57,12 @@ body {
.loleaflet-scrolled {
overflow: auto;
}
/* Important to override context-menu-icon's font-family here otherwise, jquery-contextmenu.css
* will try to load its own font file which is not available in dist/ */
.context-menu-icon::before {
font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important;
}
.context-menu-icon-lo-checkmark:before {
content: '\2713';
}

View File

@ -134,11 +134,11 @@ L.Control.ContextMenu = L.Control.extend({
if (item.checktype === 'checkmark') {
if (item.checked === 'true') {
contextMenu[item.command.icon] = 'checkmark';
contextMenu[item.command]['icon'] = 'lo-checkmark';
}
} else if (item.checktype === 'radio') {
if (item.checked === 'true') {
contextMenu[item.command.icon] = 'radio';
contextMenu[item.command]['icon'] = 'radio';
}
}