Skip to content
New issue

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

Pause terminal when loading images #802

Closed
2 of 3 tasks
jcubic opened this issue Jul 2, 2022 · 0 comments
Closed
2 of 3 tasks

Pause terminal when loading images #802

jcubic opened this issue Jul 2, 2022 · 0 comments
Labels
feature resolved if issue is resolved, it will be open until merge with master
Milestone

Comments

@jcubic
Copy link
Owner

jcubic commented Jul 2, 2022

I have an idea for a new feature for jQuery Terminal

I was reading Tutorial and realized that the code can be simplified if image loading is handled by the library.

This code:

function get_image(url) {
    return new Promise(function(resolve, reject) {
        const img = $('<img src="' + url + '"'/>');
        img.on('load', () => resolve(img));
        img.on('error', reject);
    });
}

in tutorial can be replace with just:

return $('<img src="' + url + '"'/>');

or

this.echo($('<img src="' + url + '"'/>'));

And jQuery Terminal should pause when the image is loading. This will be a breaking change so options need to be provided

  • Pause the terminal when images are loading
  • Add an option to turn that off
  • Update tutorial (also show return, don't remove the promise from tutorial only a note with version)
@jcubic jcubic added the feature label Jul 2, 2022
@jcubic jcubic added this to the 2.35.0 milestone Sep 11, 2022
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Sep 11, 2022
@jcubic jcubic closed this as completed Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant