aboutsummaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-29 23:40:04 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-12-02 23:43:51 +0000
commitacd1f451523595ba294f29a223163ba9dbb6d981 (patch)
treec10d3db72a14992f7ccdaa95b1927ec0f31f80b5 /html
parent66a927920aeecececfcf6939b5f4a43ed7079949 (diff)
downloadpuzzles-acd1f451523595ba294f29a223163ba9dbb6d981.zip
puzzles-acd1f451523595ba294f29a223163ba9dbb6d981.tar.gz
puzzles-acd1f451523595ba294f29a223163ba9dbb6d981.tar.bz2
puzzles-acd1f451523595ba294f29a223163ba9dbb6d981.tar.xz
js: Add an SVG resize handle to the HTML
This is more compact than carefully drawing it on a canvas in JavaScript. More importantly, the SVG resize handle scales nicely as the page is zoomed, or on high-DPI screens. At the moment, the nice SVG resize handle is removed by JavaScript, but we need to wait a little while for everyone to get the new HTML cached before changing that.
Diffstat (limited to 'html')
-rwxr-xr-xhtml/jspage.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/html/jspage.pl b/html/jspage.pl
index 03e3912..1f015fe 100755
--- a/html/jspage.pl
+++ b/html/jspage.pl
@@ -357,6 +357,9 @@ ${unfinishedpara}
<div id="resizable">
<canvas id="puzzlecanvas" tabindex="0"></canvas>
<div id="statusbar"></div>
+ <img id="resizehandle" alt="resize"
+ title="Drag to resize the puzzle. Right-click to restore the default size."
+ src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='10'%3E%3Cpath%20d='M8.5,1.5l-7,7m7,-4l-4,4m4,-1l-1,1'%20stroke='black'%20stroke-linecap='round'/%3E%3C/svg%3E">
</div>
<p>
Link to this puzzle: