From 4c104ab1fbed9159101c619888e94c728f6a47b3 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 24 Dec 2016 16:17:55 -0700 Subject: [PATCH] Removed the old canvas element --- scripts/core/init.js | 1 - scripts/core/ronin.js | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/core/init.js b/scripts/core/init.js index 65e8418..b73a72d 100644 --- a/scripts/core/init.js +++ b/scripts/core/init.js @@ -1,5 +1,4 @@ var ronin = new Ronin(); -ronin.canvas.element = document.getElementById('workspace'); ronin.overlay.element = document.getElementById('overlay'); ronin.surface.element = document.getElementById('surface'); ronin.widget.element = document.getElementById('widget'); diff --git a/scripts/core/ronin.js b/scripts/core/ronin.js index b697d64..79d54e1 100644 --- a/scripts/core/ronin.js +++ b/scripts/core/ronin.js @@ -4,7 +4,6 @@ function Ronin() this.widget = new Widget(); - this.canvas = new Canvas("@"); this.overlay = new Overlay("|"); this.brush = new Brush(">"); this.fileload = new FileLoad("/"); @@ -20,7 +19,6 @@ function Ronin() this.cursor = new Cursor(); - this.modules[this.canvas.rune] = this.canvas; this.modules[this.overlay.rune] = this.overlay; this.modules[this.brush.rune] = this.brush; this.modules[this.fileload.rune] = this.fileload; @@ -45,7 +43,7 @@ function Ronin() this.position_in_window = function(p) { - return new Position(p.x + parseFloat(ronin.surface.element.style.left) + parseFloat(ronin.canvas.element.style.left),p.y + parseFloat(ronin.surface.element.style.top) + parseFloat(ronin.canvas.element.style.top)); + return new Position(p.x + parseFloat(ronin.surface.element.style.left),p.y + parseFloat(ronin.surface.element.style.top)); } this.timestamp = function()