diff --git a/Nibriboard/ClientFiles/BoardWindow.js b/Nibriboard/ClientFiles/BoardWindow.js index 9cfddbf..dbb47ca 100644 --- a/Nibriboard/ClientFiles/BoardWindow.js +++ b/Nibriboard/ClientFiles/BoardWindow.js @@ -1,9 +1,9 @@ "use strict"; // npm modules -window.EventEmitter = require("event-emitter-es6"); -window.FaviconNotification = require("favicon-notification"); -window.panzoom = require("pan-zoom"); +import EventEmitter from "event-emitter-es6"; +import FaviconNotification from "favicon-notification"; +import panzoom from "pan-zoom"; // Our files import RippleLink from './RippleLink'; @@ -140,7 +140,7 @@ class BoardWindow extends EventEmitter FaviconNotification.add(); // Setup the input controls - window.panzoom(canvas, this.handleCanvasMovement.bind(this)); + panzoom(canvas, this.handleCanvasMovement.bind(this)); // --~~~-- diff --git a/Nibriboard/ClientFiles/ClientManager.js b/Nibriboard/ClientFiles/ClientManager.js index f844dfc..7dcf805 100644 --- a/Nibriboard/ClientFiles/ClientManager.js +++ b/Nibriboard/ClientFiles/ClientManager.js @@ -1,6 +1,6 @@ "use strict"; -window.EventEmitter = require("event-emitter-es6"); +import EventEmitter from "event-emitter-es6"; import OtherClient from './OtherClient'; import Vector from './Utilities/Vector'; diff --git a/Nibriboard/ClientFiles/Interface.js b/Nibriboard/ClientFiles/Interface.js index f216f55..2cc1bbe 100644 --- a/Nibriboard/ClientFiles/Interface.js +++ b/Nibriboard/ClientFiles/Interface.js @@ -1,6 +1,6 @@ "use strict"; -window.EventEmitter = require("event-emitter-es6"); +import EventEmitter from "event-emitter-es6"; import BrushIndicator from './BrushIndicator.js'; diff --git a/Nibriboard/ClientFiles/Pencil.js b/Nibriboard/ClientFiles/Pencil.js index a23bfec..eeeb0ea 100644 --- a/Nibriboard/ClientFiles/Pencil.js +++ b/Nibriboard/ClientFiles/Pencil.js @@ -1,12 +1,11 @@ "use strict"; +import cuid from "cuid"; +import { simplify_line } from "visvalingam-simplifier"; + import Vector from './Utilities/Vector'; - import Mouse from './Utilities/Mouse'; -var cuid = require("cuid"); -var simplify_line = require("visvalingam-simplifier").simplify_line; - class Pencil { /** diff --git a/Nibriboard/ClientFiles/RippleLink.js b/Nibriboard/ClientFiles/RippleLink.js index a06c845..ee725e2 100644 --- a/Nibriboard/ClientFiles/RippleLink.js +++ b/Nibriboard/ClientFiles/RippleLink.js @@ -2,7 +2,7 @@ import { WebSocketStates, ReverseWebSocketStates } from './Utilities/WebSocketStates'; -const EventEmitter = require("event-emitter-es6"); +import EventEmitter from "event-emitter-es6"; class RippleLink extends EventEmitter { diff --git a/Nibriboard/ClientFiles/index.js b/Nibriboard/ClientFiles/index.js index dcf17df..6d69857 100644 --- a/Nibriboard/ClientFiles/index.js +++ b/Nibriboard/ClientFiles/index.js @@ -1,6 +1,6 @@ "use strict"; -window.FpsIndicator = require("fps-indicator"); +import FpsIndicator from "fps-indicator"; import BoardWindow from './BoardWindow';