upgrade and fix associated issues

This commit is contained in:
JFH
2021-02-14 19:14:59 +01:00
parent 116a86138f
commit da87bae1ee
12 changed files with 3048 additions and 3329 deletions

View File

@@ -111,8 +111,10 @@ svgCanvas.setSvgString('string');
svgCanvas.setSvgString('string')(function (data, error) {
if (error) {
// There was an error
throw error
} else {
// Handle data
console.log(data)
}
});

View File

@@ -2753,12 +2753,10 @@ editor.init = () => {
* @returns {external:jQuery}
*/
const makeFlyoutHolder = function (id, child) {
const div = $('<div>', {
return $('<div>', {
class: 'tools_flyout',
id
}).appendTo('#svg_editor').append(child);
return div;
};
/**

View File

@@ -165,7 +165,6 @@ export const convertPath = function (pth, toRel) {
}
d += pathDSegment(letter, [[x1, y1], [x, y]]);
break;
// eslint-disable-next-line sonarjs/no-duplicated-branches
case 10: // absolute elliptical arc (A)
x -= curx;
y -= cury;

View File

@@ -77,7 +77,7 @@ export const setLinkControlPoints = function (lcp) {
* @type {null|module:path.Path}
* @memberof module:path
*/
export let path = null; // eslint-disable-line import/no-mutable-exports
export let path = null;
let editorContext_ = null;

View File

@@ -2701,7 +2701,7 @@ class SvgCanvas {
* @returns {module:svgcanvas.PrivateMethods}
*/
this.getPrivateMethods = function () {
const obj = {
return {
addCommandToHistory,
BatchCommand,
ChangeElementCommand,
@@ -2731,7 +2731,6 @@ class SvgCanvas {
transformPoint,
walkTree
};
return obj;
};
} // End constructor
} // End class