From c0fff857fd910eb4af7eabd6ad08da554f694f43 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 7 Apr 2013 10:24:37 +0000 Subject: Add a draggable resize handle to the JS puzzles. Rather than design an ersatz 'window frame' surrounding the puzzle canvas, I've simply overlaid the resize handle on the corner of the puzzle itself (canvas or status bar, depending on whether the latter exists), trusting that all games in my collection provide a reasonable border within their drawing area. (OS X already does this with its resize handle, so it's not as if there's no precedent.) Unlike the desktop versions, I control the resize behaviour completely in this environment, so I can constrain the canvas to only ever be sensible sizes with no dead space round the edges (and, in particular, preserve the aspect ratio). Right-clicking the resize handle will restore the puzzle's default tile size. I had intended to implement a maximise-to-browser-window button too, but was annoyingly foiled by scrollbars - if you maximise to the current window width, and as a result the text below the puzzle scrolls off the bottom, then a vertical scrollbar appears and eats into the width you just maximised to. Gah. [originally from svn r9822] --- html/jspage.pl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'html') diff --git a/html/jspage.pl b/html/jspage.pl index d6e4167..19868bd 100755 --- a/html/jspage.pl +++ b/html/jspage.pl @@ -84,10 +84,12 @@ ${unfinishedpara}

+
+

Link to this puzzle: by game ID -- cgit v1.1