simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Dec 10 20:42:51 GMT 2022


TL;DR:
  33b5c48 js: Add a new function whereby C can ask JS for a preferred board size
  9bcb06e js: Add a mode where the puzzle tries to fill the viewport
  ebb7b42 js: Don't treat SoftRight as CURSOR_SELECT2

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Ben Harris <bjh21 at bjh21.me.uk>
Date:           2022-12-10 20:42:51

commit 33b5c484295657678ea22db3d57fd19cda96a45e
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=33b5c484295657678ea22db3d57fd19cda96a45e;hp=14eb35da4aa8a66a05012af9860a7088dbf21c6d
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Oct 29 21:45:11 2022 +0100

    js: Add a new function whereby C can ask JS for a preferred board size
    
    Currently JS has no opinion.

 emcc.c     |  5 ++++-
 emcclib.js | 14 ++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

commit 9bcb06ee305455d24ab22f4c8f3556213da1a1ee
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=9bcb06ee305455d24ab22f4c8f3556213da1a1ee;hp=33b5c484295657678ea22db3d57fd19cda96a45e
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Dec 10 18:22:54 2022 +0000

    js: Add a mode where the puzzle tries to fill the viewport
    
    This is activated by putting the puzzle in an element with id
    "puzzlecanvascontain".  In that case, the puzzle's default size is as
    close to filling that element as is achievable.  Unlike in the normal
    mode, this sets the CSS size of the canvas directly.
    
    Because it might take a little while for the page to settle down after
    loading, and because the size of the viewport might change, this listens
    for "resize" and "load" events, and only bothers changing anything when
    the page is fully loaded.
    
    Waiting for the document to be complete might be a problem if we had
    images and so forth that we could plausibly be waiting for, but we
    don't.

 emcclib.js | 12 ++++++++++++
 emccpre.js | 22 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

commit ebb7b4277e2440e66b65ac910a6af143bd2833d8
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=ebb7b4277e2440e66b65ac910a6af143bd2833d8;hp=9bcb06ee305455d24ab22f4c8f3556213da1a1ee
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Dec 10 19:05:11 2022 +0000

    js: Don't treat SoftRight as CURSOR_SELECT2
    
    I was hoping that I could treat SoftLeft and SoftRight the same in C and
    arrange to filter one of them out in JavaScript, but that turned out to
    be impractical.

 emcc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list