fix eslint issues
|
@ -5,30 +5,27 @@ coverage
|
|||
instrumented
|
||||
dist
|
||||
docs/jsdoc
|
||||
archive
|
||||
|
||||
svgedit-config-es.js
|
||||
svgedit-config-iife.js
|
||||
svgedit-custom.css
|
||||
editor/xdomain-svgedit-config-iife.js
|
||||
src/editor/xdomain-svgedit-config-iife.js
|
||||
|
||||
# Vendor/minified files
|
||||
editor/jquery.min.js
|
||||
editor/jquery-ui
|
||||
src/editor/jquery.min.js
|
||||
src/editor/jquery-ui
|
||||
|
||||
# Previously minified though exporting
|
||||
editor/js-hotkeys
|
||||
src/editor/js-hotkeys
|
||||
|
||||
editor/jspdf/jspdf.min.js
|
||||
editor/jspdf/underscore-min.js
|
||||
src/editor/jspdf/jspdf.min.js
|
||||
src/editor/jspdf/underscore-min.js
|
||||
|
||||
editor/extensions/mathjax
|
||||
src/editor/extensions/mathjax
|
||||
|
||||
# Todo: We should at least check `compat/compat` in our other files, however
|
||||
editor/external/*
|
||||
!editor/external/dom-polyfill
|
||||
editor/external/dom-polyfill/*
|
||||
!editor/external/dom-polyfill/dom-polyfill.js
|
||||
!editor/external/dynamic-import-polyfill
|
||||
src/external
|
||||
|
||||
mochawesome-report
|
||||
releases
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/unambiguous */
|
||||
/* globals SVGPathSeg, SVGPathSegMovetoRel, SVGPathSegMovetoAbs,
|
||||
SVGPathSegMovetoRel, SVGPathSegLinetoRel, SVGPathSegLinetoAbs,
|
||||
SVGPathSegLinetoHorizontalRel, SVGPathSegLinetoHorizontalAbs,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
import RGBColor from './rgbcolor.js';
|
||||
import {canvasRGBA} from '../external/stackblur-canvas/dist/stackblur-es.js';
|
||||
import {canvasRGBA} from '../../external/stackblur-canvas/dist/stackblur-es.js';
|
||||
|
||||
/**
|
||||
* Whether a value is `null` or `undefined`.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @module EmbeddedSVGEditDOM
|
||||
*/
|
||||
import EmbeddedSVGEdit from './embedapi.js';
|
||||
import {isChrome} from './browser.js';
|
||||
import {isChrome} from '../common/browser.js';
|
||||
|
||||
const $ = jQuery;
|
||||
|
||||
|
@ -101,6 +101,7 @@ iframe[0].src = frameBase + framePath +
|
|||
: ''); // Append arguments to this file onto the iframe
|
||||
|
||||
iframe[0].addEventListener('load', function () {
|
||||
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
||||
svgCanvas = new EmbeddedSVGEdit(frame, [new URL(frameBase).origin]);
|
||||
// Hide main button, as we will be controlling new, load, save, etc. from the host document
|
||||
let doc;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/**
|
||||
* @file ext-arrows.js
|
||||
*
|
||||
|
@ -6,10 +7,12 @@
|
|||
* @copyright 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'arrows',
|
||||
async init (S) {
|
||||
const strings = await S.importLocale();
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
const svgCanvas = svgEditor.canvas;
|
||||
const // {svgcontent} = S,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/**
|
||||
* @file ext-closepath.js
|
||||
*
|
||||
|
@ -6,7 +7,7 @@
|
|||
* @copyright 2010 Jeff Schiller
|
||||
*
|
||||
*/
|
||||
import '../svgpathseg.js';
|
||||
import '../../common/svgpathseg.js';
|
||||
|
||||
// This extension adds a simple button to the contextual panel for paths
|
||||
// The button toggles whether the path is open or closed
|
||||
|
@ -14,6 +15,7 @@ export default {
|
|||
name: 'closepath',
|
||||
async init ({importLocale, $}) {
|
||||
const strings = await importLocale();
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
let selElems;
|
||||
const updateButton = function (path) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/* eslint-disable unicorn/no-fn-reference-in-iterator */
|
||||
/**
|
||||
* @file ext-connector.js
|
||||
|
@ -11,6 +12,7 @@
|
|||
export default {
|
||||
name: 'connector',
|
||||
async init (S) {
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
const svgCanvas = svgEditor.canvas;
|
||||
const {getElem} = svgCanvas;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/**
|
||||
* @file ext-eyedropper.js
|
||||
*
|
||||
|
@ -11,6 +12,7 @@ export default {
|
|||
name: 'eyedropper',
|
||||
async init (S) {
|
||||
const strings = await S.importLocale();
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
const {$, ChangeElementCommand} = S, // , svgcontent,
|
||||
// svgdoc = S.svgroot.parentNode.ownerDocument,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/**
|
||||
* @file ext-foreignobject.js
|
||||
*
|
||||
|
@ -10,6 +11,7 @@
|
|||
export default {
|
||||
name: 'foreignobject',
|
||||
async init (S) {
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
const {$, text2xml, NS, importLocale} = S;
|
||||
const svgCanvas = svgEditor.canvas;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/**
|
||||
* @file ext-grid.js
|
||||
*
|
||||
|
@ -11,6 +12,7 @@ export default {
|
|||
name: 'grid',
|
||||
async init ({$, NS, getTypeMap, importLocale}) {
|
||||
const strings = await importLocale();
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
const svgCanvas = svgEditor.canvas;
|
||||
const svgdoc = document.getElementById('svgcanvas').ownerDocument,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/**
|
||||
* @file ext-helloworld.js
|
||||
*
|
||||
|
@ -17,6 +18,7 @@ export default {
|
|||
async init ({$, importLocale}) {
|
||||
// See `/editor/extensions/ext-locale/helloworld/`
|
||||
const strings = await importLocale();
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
const svgCanvas = svgEditor.canvas;
|
||||
return {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
/**
|
||||
* @file ext-imagelib.js
|
||||
*
|
||||
|
@ -15,6 +16,7 @@ export default {
|
|||
!window.svgEditor ||
|
||||
window.svgEditor.modules !== false;
|
||||
|
||||
// eslint-disable-next-line consistent-this
|
||||
const svgEditor = this;
|
||||
|
||||
const {uiStrings, canvas: svgCanvas, curConfig: {extIconsPath}} = svgEditor;
|
||||
|
@ -37,6 +39,7 @@ export default {
|
|||
});
|
||||
const allowedImageLibOrigins = imagelibStrings.imgLibs.map(({url}) => {
|
||||
try {
|
||||
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
||||
return new URL(url).origin;
|
||||
} catch (err) {
|
||||
return location.origin;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Arrows',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Arrows',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '箭头',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// eslint-disable-next-line import/no-anonymous-default-export
|
||||
export default {
|
||||
name: 'ClosePath',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// eslint-disable-next-line import/no-anonymous-default-export
|
||||
export default {
|
||||
name: '闭合路径',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Connector',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Connector',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '连接器',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'eyedropper',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '滴管',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'foreignObject',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '外部对象',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'View Grid',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '网格视图',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Hello World',
|
||||
text: 'Hello World!\n\nYou clicked here: {x}, {y}',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Hello World',
|
||||
text: 'Hello World!\n\n 请点击: {x}, {y}',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: "Choisir une bibliothèque d'images",
|
||||
show_list: 'show_list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Markers',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '标记',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'MathJax',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '数学',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'Extension Panning',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '移动',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'placemark',
|
||||
langList: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: 'polygon',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
name: '多边形',
|
||||
buttons: [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
saved: 'Saved! Return to Item View!',
|
||||
hiddenframe: 'Moinsave frame to store hidden values'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
saved: '已保存! 返回视图!',
|
||||
hiddenframe: 'Moinsave frame to store hidden values'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
uploading: 'Uploading...',
|
||||
hiddenframe: 'Opensave frame to store hidden values'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
uploading: '正在上传...',
|
||||
hiddenframe: 'Opensave frame to store hidden values'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
loading: 'Loading...',
|
||||
categories: {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-anonymous-default-export */
|
||||
export default {
|
||||
loading: 'Loading...',
|
||||
categories: {
|
||||
|
|