Skip to content
Snippets Groups Projects
Commit 2d5d8d26 authored by Ray Schamp's avatar Ray Schamp
Browse files

Use let where applicable

Copy-paste-laziness
parent bbbb2bc2
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,8 @@ module.exports = {
},
attachMouseEvents: function (vm, stage) {
document.addEventListener('mousemove', function (e) {
var rect = stage.getBoundingClientRect();
var coordinates = {
let rect = stage.getBoundingClientRect();
let coordinates = {
x: e.clientX - rect.left,
y: e.clientY - rect.top,
canvasWidth: rect.width,
......@@ -27,8 +27,8 @@ module.exports = {
vm.postIOData('mouse', coordinates);
});
stage.addEventListener('mousedown', function (e) {
var rect = stage.getBoundingClientRect();
var data = {
let rect = stage.getBoundingClientRect();
let data = {
isDown: true,
x: e.clientX - rect.left,
y: e.clientY - rect.top,
......@@ -39,8 +39,8 @@ module.exports = {
e.preventDefault();
});
stage.addEventListener('mouseup', function (e) {
var rect = stage.getBoundingClientRect();
var data = {
let rect = stage.getBoundingClientRect();
let data = {
isDown: false,
x: e.clientX - rect.left,
y: e.clientY - rect.top,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment