Fix lint issues.

This commit is contained in:
Paulo Gustavo Veiga 2021-10-05 19:08:42 -07:00
parent 181ca7b34e
commit c89d40758a
17 changed files with 153 additions and 151 deletions

View File

@ -7,5 +7,7 @@
"airbnb-base" "airbnb-base"
], ],
"plugins": ["only-warn"], "plugins": ["only-warn"],
"rules": {} "rules": {
"no-underscore-dangle": "off"
}
} }

View File

@ -6,6 +6,12 @@
"extends": [ "extends": [
"airbnb-base" "airbnb-base"
], ],
"plugins": ["only-warn"], "plugins": [
"rules": {} "only-warn"
],
"rules": {
"no-underscore-dangle": "off",
"no-restricted-syntax": "off",
"max-len": [1,250]
}
} }

View File

@ -30,7 +30,9 @@ const Arrow = new Class({
strokeOpacity: 1, strokeOpacity: 1,
}; };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
}, },

View File

@ -26,7 +26,9 @@ const CurvedLine = new Class({
strokeColor: 'blue', strokeWidth: 1, strokeStyle: 'solid', strokeOpacity: 1, strokeColor: 'blue', strokeWidth: 1, strokeStyle: 'solid', strokeOpacity: 1,
}; };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
}, },
@ -36,15 +38,15 @@ const CurvedLine = new Class({
}, },
setFrom(x, y) { setFrom(x, y) {
$assert(!isNaN(x), 'x must be defined'); $assert(!Number.isNaN(x), 'x must be defined');
$assert(!isNaN(y), 'y must be defined'); $assert(!Number.isNaN(y), 'y must be defined');
this.peer.setFrom(x, y); this.peer.setFrom(x, y);
}, },
setTo(x, y) { setTo(x, y) {
$assert(!isNaN(x), 'x must be defined'); $assert(!Number.isNaN(x), 'x must be defined');
$assert(!isNaN(y), 'y must be defined'); $assert(!Number.isNaN(y), 'y must be defined');
this.peer.setTo(x, y); this.peer.setTo(x, y);
}, },

View File

@ -23,7 +23,7 @@ const Element = new Class({ // eslint-disable-line no-undef
throw new Error('Element peer can not be null'); throw new Error('Element peer can not be null');
} }
if ($defined(attributes)) { // eslint-disable-line no-undef if ($defined(attributes)) {
this._initialize(attributes); this._initialize(attributes);
} }
}, },
@ -32,30 +32,39 @@ const Element = new Class({ // eslint-disable-line no-undef
const batchExecute = {}; const batchExecute = {};
// Collect arguments ... // Collect arguments ...
for (var key in attributes) { for (const key in attributes) {
const funcName = this._attributeNameToFuncName(key, 'set'); if (Object.prototype.hasOwnProperty.call(attributes, key)) {
let funcArgs = batchExecute[funcName];
if (!$defined(funcArgs)) { // eslint-disable-line no-undef const funcName = this._attributeNameToFuncName(key, 'set');
funcArgs = []; let funcArgs = batchExecute[funcName];
}
if (!$defined(funcArgs)) {
funcArgs = [];
}
const signature = Element._propertyNameToSignature[key];
const argPositions = signature[1];
if (argPositions !== Element._SIGNATURE_MULTIPLE_ARGUMENTS) {
funcArgs[argPositions] = attributes[key];
} else {
funcArgs = attributes[key].split(' ');
}
batchExecute[funcName] = funcArgs;
const signature = Element._propertyNameToSignature[key];
const argPositions = signature[1];
if (argPositions != Element._SIGNATURE_MULTIPLE_ARGUMENTS) {
funcArgs[argPositions] = attributes[key];
} else {
funcArgs = attributes[key].split(' ');
} }
batchExecute[funcName] = funcArgs;
} }
// Call functions ... // Call functions ...
for (var key in batchExecute) { // eslint-disable-line no-redeclare for (const key in batchExecute) {
const func = this[key]; if (Object.prototype.hasOwnProperty.call(batchExecute, key)) {
if (!$defined(func)) { // eslint-disable-line no-undef
throw new Error(`Could not find function: ${key}`); const func = this[key];
if (!$defined(func)) {
throw new Error(`Could not find function: ${key}`);
}
func.apply(this, batchExecute[key]);
} }
func.apply(this, batchExecute[key]);
} }
}, },
@ -72,7 +81,8 @@ const Element = new Class({ // eslint-disable-line no-undef
* type * type
* A string representing the event type to listen for. * A string representing the event type to listen for.
* listener * listener
* The object that receives a notification when an event of the specified type occurs. This must be an object implementing the EventListener interface, or simply a function in JavaScript. * The object that receives a notification when an event of the specified type occurs. This must be an object
* implementing the EventListener interface, or simply a function in JavaScript.
* *
* The following events types are supported: * The following events types are supported:
* *
@ -146,13 +156,13 @@ const Element = new Class({ // eslint-disable-line no-undef
*/ */
setStroke(width, style, color, opacity) { setStroke(width, style, color, opacity) {
if ( if (
style != null style !== null
&& style != undefined && style !== undefined
&& style != 'dash' && style !== 'dash'
&& style != 'dot' && style !== 'dot'
&& style != 'solid' && style !== 'solid'
&& style != 'longdash' && style !== 'longdash'
&& style != 'dashdot' && style !== 'dashdot'
) { ) {
throw new Error(`Unsupported stroke style: '${style}'`); throw new Error(`Unsupported stroke style: '${style}'`);
} }
@ -161,8 +171,8 @@ const Element = new Class({ // eslint-disable-line no-undef
_attributeNameToFuncName(attributeKey, prefix) { _attributeNameToFuncName(attributeKey, prefix) {
const signature = Element._propertyNameToSignature[attributeKey]; const signature = Element._propertyNameToSignature[attributeKey];
if (!$defined(signature)) { // eslint-disable-line no-undef if (!$defined(signature)) {
throw `Unsupported attribute: ${attributeKey}`; throw new Error(`Unsupported attribute: ${attributeKey}`);
} }
const firstLetter = signature[0].charAt(0); const firstLetter = signature[0].charAt(0);
@ -175,11 +185,12 @@ const Element = new Class({ // eslint-disable-line no-undef
* fill, fillColor, fillOpacity, coordSize, coordSizeWidth, coordSizeHeight, coordOrigin, coordOriginX, coordOrigiY * fill, fillColor, fillOpacity, coordSize, coordSizeWidth, coordSizeHeight, coordOrigin, coordOriginX, coordOrigiY
*/ */
setAttribute(key, value) { setAttribute(key, value) {
const funcName = this._attributeNameToFuncName(key, 'set'); const funcName = this._attributeNameToFuncName(key, 'set');
const signature = Element._propertyNameToSignature[key]; const signature = Element._propertyNameToSignature[key];
if (signature == null) { if (signature == null) {
throw `Could not find the signature for:${key}`; throw new Error(`Could not find the signature for:${key}`);
} }
// Parse arguments .. // Parse arguments ..
@ -187,7 +198,7 @@ const Element = new Class({ // eslint-disable-line no-undef
let args = []; let args = [];
if (argPositions !== this._SIGNATURE_MULTIPLE_ARGUMENTS) { if (argPositions !== this._SIGNATURE_MULTIPLE_ARGUMENTS) {
args[argPositions] = value; args[argPositions] = value;
} else if (typeof value === 'array') { // eslint-disable-line valid-typeof } else if (Array.isArray(value)) {
args = value; args = value;
} else { } else {
const strValue = String(value); const strValue = String(value);
@ -197,7 +208,7 @@ const Element = new Class({ // eslint-disable-line no-undef
// Look up method ... // Look up method ...
const setter = this[funcName]; const setter = this[funcName];
if (setter == null) { if (setter == null) {
throw `Could not find the function name:${funcName}`; throw new Error(`Could not find the function name:${funcName}`);
} }
setter.apply(this, args); setter.apply(this, args);
}, },
@ -207,23 +218,23 @@ const Element = new Class({ // eslint-disable-line no-undef
const signature = Element._propertyNameToSignature[key]; const signature = Element._propertyNameToSignature[key];
if (signature == null) { if (signature == null) {
throw `Could not find the signature for:${key}`; throw new Error(`Could not find the signature for:${key}`);
} }
const getter = this[funcName]; const getter = this[funcName];
if (getter == null) { if (getter == null) {
throw `Could not find the function name:${funcName}`; throw new Error(`Could not find the function name:${funcName}`);
} }
const getterResult = getter.apply(this, []); const getterResult = getter.apply(this, []);
const attibuteName = signature[2]; const attibuteName = signature[2];
if (!$defined(attibuteName)) { // eslint-disable-line no-undef if (!$defined(attibuteName)) {
throw `Could not find attribute mapping for:${key}`; throw new Error(`Could not find attribute mapping for:${key}`);
} }
const result = getterResult[attibuteName]; const result = getterResult[attibuteName];
if (!$defined(result)) { // eslint-disable-line no-undef if (!$defined(result)) {
throw `Could not find attribute with name:${attibuteName}`; throw new Error(`Could not find attribute with name:${attibuteName}`);
} }
return result; return result;

View File

@ -26,7 +26,9 @@ const Elipse = new Class({
width: 40, height: 40, x: 5, y: 5, stroke: '1 solid black', fillColor: 'blue', width: 40, height: 40, x: 5, y: 5, stroke: '1 solid black', fillColor: 'blue',
}; };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
}, },

View File

@ -15,7 +15,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
const Toolkit = require('./Toolkit');
const TransformUtil = require('./peer/utils/TransformUtils').default; const TransformUtil = require('./peer/utils/TransformUtils').default;
const Font = new Class({ const Font = new Class({

View File

@ -29,7 +29,9 @@ const Group = new Class({
width: 50, height: 50, x: 50, y: 50, coordOrigin: '0 0', coordSize: '50 50', width: 50, height: 50, x: 50, y: 50, coordOrigin: '0 0', coordSize: '50 50',
}; };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
}, },
@ -62,7 +64,7 @@ const Group = new Class({
throw Error('Child element can not be null'); throw Error('Child element can not be null');
} }
if (element == this) { if (element === this) {
throw new Error("It's not posible to add the group as a child of itself"); throw new Error("It's not posible to add the group as a child of itself");
} }
@ -71,7 +73,7 @@ const Group = new Class({
throw new Error(`It seems not to be an element ->${element}`); throw new Error(`It seems not to be an element ->${element}`);
} }
if (elementType == 'Workspace') { if (elementType === 'Workspace') {
throw new Error('A group can not have a workspace as a child'); throw new Error('A group can not have a workspace as a child');
} }

View File

@ -24,7 +24,9 @@ const Line = new Class({
const peer = Toolkit.createLine(); const peer = Toolkit.createLine();
const defaultAttributes = { strokeColor: '#495879', strokeWidth: 1, strokeOpacity: 1 }; const defaultAttributes = { strokeColor: '#495879', strokeWidth: 1, strokeOpacity: 1 };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
}, },

View File

@ -26,7 +26,9 @@ const PolyLine = new Class({
strokeColor: 'blue', strokeWidth: 1, strokeStyle: 'solid', strokeOpacity: 1, strokeColor: 'blue', strokeWidth: 1, strokeStyle: 'solid', strokeOpacity: 1,
}; };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
}, },

View File

@ -28,19 +28,17 @@ const Rect = new Class({
Extends: Element, Extends: Element,
initialize(arc, attributes) { initialize(arc, attributes) {
if (arc && arc > 1) { if (arc && arc > 1) {
throw 'Arc must be 0<=arc<=1'; throw new Error('Arc must be 0<=arc<=1');
} }
if (arguments.length <= 0) {
const rx = 0;
const ry = 0;
}
const peer = Toolkit.createRect(arc); const peer = Toolkit.createRect(arc);
const defaultAttributes = { const defaultAttributes = {
width: 40, height: 40, x: 5, y: 5, stroke: '1 solid black', fillColor: 'green', width: 40, height: 40, x: 5, y: 5, stroke: '1 solid black', fillColor: 'green',
}; };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
}, },

View File

@ -87,7 +87,7 @@ const Text = new Class({
}, },
getHeight() { getHeight() {
return parseInt(this.peer.getHeight()); return parseInt(this.peer.getHeight(), 10);
}, },
getFontHeight() { getFontHeight() {

View File

@ -33,7 +33,9 @@ const Workspace = new Class({
coordSize: '200 200', coordSize: '200 200',
}; };
for (const key in attributes) { for (const key in attributes) {
defaultAttributes[key] = attributes[key]; if (Object.prototype.hasOwnProperty.call(attributes, key)) {
defaultAttributes[key] = attributes[key];
}
} }
this.parent(peer, defaultAttributes); this.parent(peer, defaultAttributes);
this._htmlContainer.append(this.peer._native); this._htmlContainer.append(this.peer._native);
@ -48,15 +50,15 @@ const Workspace = new Class({
*/ */
append(element) { append(element) {
if (!$defined(element)) { if (!$defined(element)) {
throw 'Child element can not be null'; throw new Error('Child element can not be null');
} }
const elementType = element.getType(); const elementType = element.getType();
if (elementType == null) { if (elementType == null) {
throw `It seems not to be an element ->${element}`; throw new Error(`It seems not to be an element ->${element}`);
} }
if (elementType == 'Workspace') { if (elementType === 'Workspace') {
throw 'A workspace can not have a workspace as a child'; throw new Error('A workspace can not have a workspace as a child');
} }
this.peer.append(element.peer); this.peer.append(element.peer);
@ -64,7 +66,7 @@ const Workspace = new Class({
addItAsChildTo(element) { addItAsChildTo(element) {
if (!$defined(element)) { if (!$defined(element)) {
throw 'Workspace div container can not be null'; throw new Error('Workspace div container can not be null');
} }
element.append(this._htmlContainer); element.append(this._htmlContainer);
}, },
@ -157,13 +159,13 @@ const Workspace = new Class({
}, },
setStroke(width, style, color, opacity) { setStroke(width, style, color, opacity) {
if (style != 'solid') { if (style !== 'solid') {
throw `Not supported style stroke style:${style}`; throw new Error(`Not supported style stroke style:${style}`);
} }
this._htmlContainer.css('border', `${width} ${style} ${color}`); this._htmlContainer.css('border', `${width} ${style} ${color}`);
if (opacity || opacity === 0) { if (opacity || opacity === 0) {
throw 'Unsupported operation. Opacity not supported.'; throw new Error('Unsupported operation. Opacity not supported.');
} }
}, },
@ -176,16 +178,16 @@ const Workspace = new Class({
*/ */
removeChild(element) { removeChild(element) {
if (!$defined(element)) { if (!$defined(element)) {
throw 'Child element can not be null'; throw new Error('Child element can not be null');
} }
if (element == this) { if (element === this) {
throw "It's not possible to add the group as a child of itself"; throw new Error("It's not possible to add the group as a child of itself");
} }
const elementType = element.getType(); const elementType = element.getType();
if (elementType == null) { if (elementType == null) {
throw `It seems not to be an element ->${element}`; throw new Error(`It seems not to be an element ->${element}`);
} }
this.peer.removeChild(element.peer); this.peer.removeChild(element.peer);

View File

@ -1,23 +0,0 @@
/*
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const web2d = {};
web2d.peer = {
svg: {},
};
web2d.peer.utils = {};

View File

@ -48,8 +48,8 @@ const CurvedLinePeer = new Class({
const change = this._control2.x != control.x || this._control2.y != control.y; const change = this._control2.x != control.x || this._control2.y != control.y;
if ($defined(control.x)) { if ($defined(control.x)) {
this._control2 = control; this._control2 = control;
this._control2.x = parseInt(this._control2.x); this._control2.x = parseInt(this._control2.x, 10);
this._control2.y = parseInt(this._control2.y); this._control2.y = parseInt(this._control2.y, 10);
} }
if (change) this._updatePath(); if (change) this._updatePath();
}, },
@ -75,16 +75,16 @@ const CurvedLinePeer = new Class({
}, },
setFrom(x1, y1) { setFrom(x1, y1) {
const change = this._x1 != parseInt(x1) || this._y1 != parseInt(y1); const change = this._x1 != parseInt(x1, 10) || this._y1 != parseInt(y1, 10);
this._x1 = parseInt(x1); this._x1 = parseInt(x1, 10);
this._y1 = parseInt(y1); this._y1 = parseInt(y1, 10);
if (change) this._updatePath(); if (change) this._updatePath();
}, },
setTo(x2, y2) { setTo(x2, y2) {
const change = this._x2 != parseInt(x2) || this._y2 != parseInt(y2); const change = this._x2 !== parseInt(x2, 10) || this._y2 !== parseInt(y2, 10);
this._x2 = parseInt(x2); this._x2 = parseInt(x2, 10);
this._y2 = parseInt(y2); this._y2 = parseInt(y2, 10);
if (change) this._updatePath(); if (change) this._updatePath();
}, },
@ -149,14 +149,9 @@ const CurvedLinePeer = new Class({
if ($defined(this._x1) && $defined(this._y1) && $defined(this._x2) && $defined(this._y2)) { if ($defined(this._x1) && $defined(this._y1) && $defined(this._x2) && $defined(this._y2)) {
this._calculateAutoControlPoints(avoidControlPointFix); this._calculateAutoControlPoints(avoidControlPointFix);
const path = `M${this._x1},${this._y1 const path = `M${this._x1},${this._y1
} C${this._control1.x + this._x1},${this._control1.y + this._y1} ${ } C${this._control1.x + this._x1},${this._control1.y + this._y1} ${this._control2.x + this._x2},${this._control2.y + this._y2} ${this._x2},${this._y2
this._control2.x + this._x2},${this._control2.y + this._y2} ${ }${this._lineStyle ? ` ${this._control2.x + this._x2},${this._control2.y + this._y2 + 3} ${this._control1.x + this._x1},${this._control1.y + this._y1 + 5} ${this._x1},${this._y1 + 7} Z`
this._x2},${this._y2 : ''}`;
}${this._lineStyle ? ` ${
this._control2.x + this._x2},${this._control2.y + this._y2 + 3} ${
this._control1.x + this._x1},${this._control1.y + this._y1 + 5} ${
this._x1},${this._y1 + 7} Z`
: ''}`;
this._native.setAttribute('d', path); this._native.setAttribute('d', path);
} }
}, },

View File

@ -18,7 +18,7 @@
const TransformUtil = { const TransformUtil = {
workoutScale: function(elementPeer) //eslint-disable-line workoutScale: function(elementPeer) //eslint-disable-line
{ {
let current = elementPeer.getParent(); let current = elementPeer.getParent();
let width = 1; let width = 1;
@ -27,8 +27,8 @@ const TransformUtil = {
const coordSize = current.getCoordSize(); const coordSize = current.getCoordSize();
const size = current.getSize(); const size = current.getSize();
width *= (parseInt(size.width) / coordSize.width); width *= (parseInt(size.width,10) / coordSize.width);
height *= (parseInt(size.height) / coordSize.height); height *= (parseInt(size.height,10) / coordSize.height);
current = current.getParent(); current = current.getParent();
} }
return { width, height }; return { width, height };

View File

@ -2,39 +2,39 @@
function web2D() { function web2D() {
global.$ = require('jquery'); global.$ = require('jquery');
require('mootools'); require('mootools');
const coreJs = require('@wismapping/core-js'); const coreJs = require('@wismapping/core-js');
global.core = coreJs(); global.core = coreJs();
const elementPeer = require('./components/peer/svg/ElementPeer').default; const elementPeer = require('./components/peer/svg/ElementPeer').default;
const element = require('./components/Element').default; const element = require('./components/Element').default;
const workspace = require('./components/Workspace').default; const workspace = require('./components/Workspace').default;
const workspacePeer = require('./components/peer/svg/WorkspacePeer').default; const workspacePeer = require('./components/peer/svg/WorkspacePeer').default;
const toolkit = require('./components/Toolkit').default; const toolkit = require('./components/Toolkit').default;
const elipse = require('./components/Elipse').default; const elipse = require('./components/Elipse').default;
const elipsePeer = require('./components/peer/svg/ElipsePeer').default; const elipsePeer = require('./components/peer/svg/ElipsePeer').default;
const linePeer = require('./components/peer/svg/LinePeer').default; const linePeer = require('./components/peer/svg/LinePeer').default;
const line = require('./components/Line').default; const line = require('./components/Line').default;
const polyLine = require('./components/PolyLine').default; const polyLine = require('./components/PolyLine').default;
const curvedLine = require('./components/CurvedLine').default; const curvedLine = require('./components/CurvedLine').default;
const arrow = require('./components/Arrow').default; const arrow = require('./components/Arrow').default;
const polyLinePeer = require('./components/peer/svg/PolyLinePeer').default; const polyLinePeer = require('./components/peer/svg/PolyLinePeer').default;
const curvedLinePeer = require('./components/peer/svg/CurvedLinePeer').default; const curvedLinePeer = require('./components/peer/svg/CurvedLinePeer').default;
const arrowPeer = require('./components/peer/svg/ArrowPeer').default; const arrowPeer = require('./components/peer/svg/ArrowPeer').default;
const groupPeer = require('./components/peer/svg/GroupPeer').default; const groupPeer = require('./components/peer/svg/GroupPeer').default;
const group = require('./components/Group').default; const group = require('./components/Group').default;
const rect = require('./components/Rect').default; const rect = require('./components/Rect').default;
const rectPeer = require('./components/peer/svg/RectPeer').default; const rectPeer = require('./components/peer/svg/RectPeer').default;
const text = require('./components/Text').default; const text = require('./components/Text').default;
const textPeer = require('./components/peer/svg/TextPeer').default; const textPeer = require('./components/peer/svg/TextPeer').default;
const transformUtils = require('./components/peer/utils/TransformUtils').default; const transformUtils = require('./components/peer/utils/TransformUtils').default;
const eventUtils = require('./components/peer/utils/EventUtils').default; const eventUtils = require('./components/peer/utils/EventUtils').default;
const font = require('./components/Font').default; const font = require('./components/Font').default;
const fontPeer = require('./components/peer/svg/Font').default; const fontPeer = require('./components/peer/svg/Font').default;
const tahomaFont = require('./components/peer/svg/TahomaFont').default; const tahomaFont = require('./components/peer/svg/TahomaFont').default;
const timesFont = require('./components/peer/svg/TimesFont').default; const timesFont = require('./components/peer/svg/TimesFont').default;
const arialFont = require('./components/peer/svg/ArialFont').default; const arialFont = require('./components/peer/svg/ArialFont').default;
const verdanaFont = require('./components/peer/svg/VerdanaFont').default; const verdanaFont = require('./components/peer/svg/VerdanaFont').default;
const point = require('./components/Point').default; const point = require('./components/Point').default;
const web2d = { const web2d = {
ElementPeer: elementPeer, ElementPeer: elementPeer,
@ -69,7 +69,7 @@ function web2D() {
Point: point, Point: point,
}; };
return web2d; return web2d;
} }
module.exports = web2D; module.exports = web2D;