aboutsummaryrefslogtreecommitdiff
path: root/PuzzleApplet.java
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-02-22 12:36:59 +0000
committerSimon Tatham <anakin@pobox.com>2023-02-22 12:51:01 +0000
commit9d7c2b8c83506c1f239c840e372058fac603b255 (patch)
treecc7f5618e8a4d6c20f7c8b6d093a3173a97368d1 /PuzzleApplet.java
parent5c858253f9456b970be5d5ef3e7df727d39e3da7 (diff)
downloadpuzzles-9d7c2b8c83506c1f239c840e372058fac603b255.zip
puzzles-9d7c2b8c83506c1f239c840e372058fac603b255.tar.gz
puzzles-9d7c2b8c83506c1f239c840e372058fac603b255.tar.bz2
puzzles-9d7c2b8c83506c1f239c840e372058fac603b255.tar.xz
JS puzzles: use the PointerEvent API if available.
If the browser knows what 'PointerEvent' means, then we switch our 'onmousefoo' event handlers to the 'onpointerfoo' events, for both the puzzle canvas and the resize handle. The immediate effect of this is that we get to use the setPointerCapture method on the puzzle canvas, in preference to the deprecated Firefox-only setCapture. A pointer event also contains extra fields compared to a mouse event: as well as telling you which pointing device the event comes from, it can also provide extra information, such as pressure, or the angle of a stylus if the hardware can detect it. I don't have any immediate ideas about what those could be used for, but it can't hurt to have them available just in case we think of something in future.
Diffstat (limited to 'PuzzleApplet.java')
0 files changed, 0 insertions, 0 deletions