- Linting (ESLint): Finish

- Fix: Globals (x, y) in `mouseMove`
- Fix: Global (element, d_attr->dAttr) in `mouseDown`
- Fix: Avoid `drawnPath` not defined error
- Docs: sp.
This commit is contained in:
Brett Zamir
2018-05-16 16:32:44 +08:00
parent eba9dee54c
commit a3b3525789
17 changed files with 1738 additions and 1776 deletions

View File

@@ -1,4 +1,4 @@
/* eslint-disable no-var, eqeqeq */
/* eslint-disable no-var */
/* globals $, svgEditor */
/**
* Package: svgedit.contextmenu
@@ -17,7 +17,7 @@ if (!svgedit.contextmenu) {
}
self.contextMenuExtensions = {};
var menuItemIsValid = function (menuItem) {
return menuItem && menuItem.id && menuItem.label && menuItem.action && typeof menuItem.action == 'function';
return menuItem && menuItem.id && menuItem.label && menuItem.action && typeof menuItem.action === 'function';
};
var addContextMenuItem = function (menuItem) {
// menuItem: {id, label, shortcut, action}