LGTM.com-inspired changes:
- Fix: Ensure all apostrophes are escaped for `toXml` utility - Fix: Avoid error if `URL` is not defined - Fix (jPicker): Precision argument had not been passed in previously - Fix (Star extension): Minor: Avoid erring if `inradius` is `NaN` - Refactoring: Avoid passing unused arguments, setting unused variables, and making unnecessary checks; avoid useless call to `createSVGMatrix` - Linting (LGTM): Add `lgtm.yml` file (still some remaining items flagged but hoping for in-code flagging) - Docs: Contributing file
This commit is contained in:
@@ -279,7 +279,7 @@ export default {
|
||||
const poslist = {start_marker: 'start', mid_marker: 'mid', end_marker: 'end'};
|
||||
const pos = poslist[this.id];
|
||||
const markerName = 'marker-' + pos;
|
||||
let el = selElems[0];
|
||||
const el = selElems[0];
|
||||
const marker = getLinked(el, markerName);
|
||||
if (marker) { $(marker).remove(); }
|
||||
el.removeAttribute(markerName);
|
||||
@@ -294,7 +294,9 @@ export default {
|
||||
const id = markerPrefix + pos + '_' + el.id;
|
||||
addMarker(id, val);
|
||||
svgCanvas.changeSelectedAttribute(markerName, 'url(#' + id + ')');
|
||||
if (el.tagName === 'line' && pos === 'mid') { el = convertline(el); }
|
||||
if (el.tagName === 'line' && pos === 'mid') {
|
||||
convertline(el);
|
||||
}
|
||||
svgCanvas.call('changed', selElems);
|
||||
setIcon(pos, val);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
|
||||
polyPoints += x + ',' + y + ' ';
|
||||
|
||||
if (inradius != null) {
|
||||
if (!isNaN(inradius)) {
|
||||
angle = (2.0 * Math.PI * (s / point)) + (Math.PI / point);
|
||||
if (orient === 'point') {
|
||||
angle -= (Math.PI / 2);
|
||||
|
||||
Reference in New Issue
Block a user