We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The task is to add this context (that in source code is in self variable) to mousewheel and touchscroll and update TypeScript types for the callbacks.
self
mousewheel
touchscroll
This code should work:
function scroll() { const { length } = this.get_output().split('\n'); const rows = term.rows(); if (rows > length) { this.removeClass('shake'); this.addClass('shake'); this.stopTime('shake'); this.oneTime(200, 'shake', () => { this.removeClass('shake'); }); } } export function initTerminal() { const $ = globalThis.$; const $term = $('.term'); $term.empty(); const term = $term.terminal({}, { mousewheel: scroll, touchscroll: scroll }); return $term; };
Code taken from new website (after refactoring to new API).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have an idea for a new feature for jQuery Terminal
The task is to add this context (that in source code is in
self
variable) tomousewheel
andtouchscroll
and update TypeScript types for the callbacks.This code should work:
Code taken from new website (after refactoring to new API).
The text was updated successfully, but these errors were encountered: