From 8c4c6a18e6c0cf91987717986a17c320dcea271e Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Tue, 4 Feb 2020 17:00:39 -0500 Subject: [PATCH] Fix test canvas causing the layout to get messed up --- macrovision.css | 5 +++++ macrovision.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/macrovision.css b/macrovision.css index 3e02e610..92383f0a 100644 --- a/macrovision.css +++ b/macrovision.css @@ -148,4 +148,9 @@ body { .options-row .options-field-unit { flex: 1; font-size: 150%; +} + +body #test-canvas { + position: fixed; + top: 100vh; } \ No newline at end of file diff --git a/macrovision.js b/macrovision.js index b75f6d44..4801bb33 100644 --- a/macrovision.js +++ b/macrovision.js @@ -279,8 +279,10 @@ function clearViewOptions(entity, view) { // stack overflow // https://stackoverflow.com/questions/38487569/click-through-png-image-only-if-clicked-coordinate-is-transparent -const testCtx = document.createElement("canvas").getContext("2d"); +const testCanvas = document.createElement("canvas"); +testCanvas.id = "test-canvas"; +const testCtx = testCanvas.getContext("2d"); function testClick(event) { const target = event.target;