Repository navigation
Mouse selection on a scaled canvas element #5869
Unanswered
michaelrommel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Eric Zhang created sshx.io and made some patches to xtermjs to work with multiple terminals rendering the same content. Patches involved filtering ESC sequences, esp. report queries and scaling of an xtermjs embedded in a scaled canvas element. He forked the repo and patched it. I integrated this into my own website and managed to filter the esc sequences differently, allowing me to use the official 6.0 version of xtermjs.
The only thing, that is open, is the scaling issue. Rendering and everything is fine, it is just that when the xterm is scaled, the mouse selection no longer works.
Eric patched two places:
I am now wondering, if there is any official API, where one could set a scale factor, that xtermjs could use to correct the mouse coordinates / selection. I read the complete API description and could not find anything. Also there are many threads related to DPR/DPI discussions, but I believe they are for slightly different use cases, although the use of
.clientwidthpoints to some overlap.So my question: is something there, how this issue could be addressed without forking and patching xtermjs?
All reactions