ref: dbb2d2adb28eec4258783aa37589ccf4a3265f8f
parent: 1611a5e058204c5ab4cd2ac29d2d3f7a2184d35d
author: Ben Harris <bjh21@bjh21.me.uk>
date: Tue Nov 29 18:34:43 EST 2022
js: Allow for putting a resize handle in HTML
--- a/emccpre.js
+++ b/emccpre.js
@@ -572,8 +572,12 @@
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.
- var resize_handle = document.createElement("canvas");
+ resize_handle = document.createElement("canvas");
resize_handle.width = 10;
resize_handle.height = 10;