- Fix (jPicker): Avoid setting Math.precision pseudo-global

- Refactoring (jPicker): Use ES6 templates; avoid unnecessary check
- Refactoring: Avoid useless assignment (courtesty lgtm)
- Build: Update files
This commit is contained in:
Brett Zamir
2018-09-22 08:49:14 +08:00
parent be17cd249c
commit dab1ff81af
15 changed files with 399 additions and 439 deletions

View File

@@ -237,7 +237,7 @@ var svgEditorExtension_markers = (function () {
addMarker(id, val);
svgCanvas.changeSelectedAttribute(markerName, 'url(#' + id + ')');
if (el.tagName === 'line' && pos === 'mid') {
el = convertline(el);
convertline(el);
}
svgCanvas.call('changed', selElems);
setIcon(pos, val);

View File

@@ -958,9 +958,6 @@ var svgEditorExtension_server_moinsave = (function () {
// ajax
svg.ajax = function (url, asynch) {
var AJAX = window.XMLHttpRequest ? new XMLHttpRequest() : new window.ActiveXObject('Microsoft.XMLHTTP');
if (!AJAX) {
return null;
}
if (asynch) {
return new Promise(function (resolve, reject) {
var req = AJAX.open('GET', url, true);

View File

@@ -958,9 +958,6 @@ var svgEditorExtension_server_opensave = (function () {
// ajax
svg.ajax = function (url, asynch) {
var AJAX = window.XMLHttpRequest ? new XMLHttpRequest() : new window.ActiveXObject('Microsoft.XMLHTTP');
if (!AJAX) {
return null;
}
if (asynch) {
return new Promise(function (resolve, reject) {
var req = AJAX.open('GET', url, true);

View File

@@ -210,7 +210,7 @@ var svgEditorExtension_star = (function () {
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;