aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-29 23:44:59 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-12-02 23:49:00 +0000
commitf0d47053640c18d99252a57466272f53fbabac25 (patch)
treea804f966cd07df052ce89f8026be5aee8cd09099
parent2522dd249bc30472a8a9a1ae12286cba6542ba9c (diff)
downloadpuzzles-f0d47053640c18d99252a57466272f53fbabac25.zip
puzzles-f0d47053640c18d99252a57466272f53fbabac25.tar.gz
puzzles-f0d47053640c18d99252a57466272f53fbabac25.tar.bz2
puzzles-f0d47053640c18d99252a57466272f53fbabac25.tar.xz
js: Switch to using the resize handle in the HTML
-rw-r--r--emccpre.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/emccpre.js b/emccpre.js
index 942f933..bba40bc 100644
--- a/emccpre.js
+++ b/emccpre.js
@@ -570,30 +570,7 @@ function initPuzzle() {
resizable_div = document.getElementById("resizable");
if (resizable_div !== null) {
- // Delete any existing resize handle.
var resize_handle = document.getElementById("resizehandle");
- if (resize_handle)
- resize_handle.parentNode.removeChild(resize_handle);
- // Create the resize handle.
- resize_handle = document.createElement("canvas");
- resize_handle.width = 10;
- resize_handle.height = 10;
-
- var ctx = resize_handle.getContext("2d");
- ctx.beginPath();
- for (var i = 1; i <= 7; i += 3) {
- ctx.moveTo(8.5, i + 0.5);
- ctx.lineTo(i + 0.5, 8.5);
- }
- ctx.lineWidth = '1px';
- ctx.lineCap = 'round';
- ctx.lineJoin = 'round';
- ctx.strokeStyle = '#000000';
- ctx.stroke();
-
- resizable_div.appendChild(resize_handle);
- resize_handle.id = "resizehandle";
- resize_handle.title = "Drag to resize the puzzle. Right-click to restore the default size.";
var resize_xbase = null, resize_ybase = null, restore_pending = false;
var resize_xoffset = null, resize_yoffset = null;
var resize_puzzle = Module.cwrap('resize_puzzle',