From 48642f2dcf31711d3e9b4b0166164252145369d3 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 19 Dec 2021 09:11:45 -0800 Subject: [PATCH] More eslint fixes. --- packages/mindplot/src/components/Command.js | 9 ++------- packages/mindplot/src/components/ConnectionLine.js | 10 +++++----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/mindplot/src/components/Command.js b/packages/mindplot/src/components/Command.js index 29895eb6..f259b7ea 100644 --- a/packages/mindplot/src/components/Command.js +++ b/packages/mindplot/src/components/Command.js @@ -26,17 +26,12 @@ class Command { this._id = Command._nextUUID(); } - /** - * @abstract - */ + // eslint-disable-next-line no-unused-vars execute(commandContext) { throw new Error('execute must be implemented.'); } - /** - * Triggered by the undo button - reverses the executed command - * @abstract - */ + // eslint-disable-next-line no-unused-vars undoExecute(commandContext) { throw new Error('undo must be implemented.'); } diff --git a/packages/mindplot/src/components/ConnectionLine.js b/packages/mindplot/src/components/ConnectionLine.js index 13267ac8..5a0da452 100644 --- a/packages/mindplot/src/components/ConnectionLine.js +++ b/packages/mindplot/src/components/ConnectionLine.js @@ -17,7 +17,9 @@ */ import { $assert, $defined } from '@wisemapping/core-js'; -import { Point, CurvedLine, PolyLine, Line } from '@wisemapping/web2d'; +import { + Point, CurvedLine, PolyLine, Line, +} from '@wisemapping/web2d'; import INodeModel, { TopicShape } from './model/INodeModel'; import TopicConfig from './TopicConfig'; @@ -101,10 +103,8 @@ class ConnectionLine { const targetTopic = this._targetTopic; const targetPosition = targetTopic.getPosition(); - let sPos; - let tPos; - sPos = sourceTopic.workoutOutgoingConnectionPoint(targetPosition); - tPos = targetTopic.workoutIncomingConnectionPoint(sourcePosition); + const sPos = sourceTopic.workoutOutgoingConnectionPoint(targetPosition); + const tPos = targetTopic.workoutIncomingConnectionPoint(sourcePosition); line2d.setFrom(tPos.x, tPos.y); line2d.setTo(sPos.x, sPos.y);