Skip to content

Commit

Permalink
scroll to bottom for each line in multiline typing animation
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 23, 2021
1 parent 9b776e1 commit 66dcef1
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
## 2.30.3
### Bugfix
* fix prompt that return string or promise (in animation and set_prompt) [#724](https://github.com/jcubic/jquery.terminal/issues/724)
* scroll to bottom for each line in multiline typing animation

## 2.30.2
### Bugfix
Expand Down
10 changes: 7 additions & 3 deletions js/jquery.terminal-2.30.2.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Thu, 23 Dec 2021 18:57:14 +0000
* Date: Thu, 23 Dec 2021 19:29:33 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -3489,7 +3489,7 @@
set: set
};
with_prompt(prompt, function(prompt) {
daa.set(prompt);
data.set(prompt);
}, self);
};
})();
Expand Down Expand Up @@ -5130,7 +5130,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: '2.30.2',
date: 'Thu, 23 Dec 2021 18:57:14 +0000',
date: 'Thu, 23 Dec 2021 19:29:33 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -8813,10 +8813,14 @@
} else {
self.set_prompt('');
}
var bottom = self.is_bottom();
var interval = setInterval(function() {
var chr = $.terminal.substring(message, char_i, char_i + 1);
new_prompt += chr;
self.set_prompt(new_prompt);
if (chr === '\n' && bottom) {
self.scroll_to_bottom();
}
char_i++;
if (char_i === len) {
clearInterval(interval);
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-2.30.2.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion js/jquery.terminal-src.js
Expand Up @@ -3489,7 +3489,7 @@
set: set
};
with_prompt(prompt, function(prompt) {
daa.set(prompt);
data.set(prompt);
}, self);
};
})();
Expand Down Expand Up @@ -8813,10 +8813,14 @@
} else {
self.set_prompt('');
}
var bottom = self.is_bottom();
var interval = setInterval(function() {
var chr = $.terminal.substring(message, char_i, char_i + 1);
new_prompt += chr;
self.set_prompt(new_prompt);
if (chr === '\n' && bottom) {
self.scroll_to_bottom();
}
char_i++;
if (char_i === len) {
clearInterval(interval);
Expand Down
10 changes: 7 additions & 3 deletions js/jquery.terminal.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Thu, 23 Dec 2021 18:57:14 +0000
* Date: Thu, 23 Dec 2021 19:29:33 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -3489,7 +3489,7 @@
set: set
};
with_prompt(prompt, function(prompt) {
daa.set(prompt);
data.set(prompt);
}, self);
};
})();
Expand Down Expand Up @@ -5130,7 +5130,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: '2.30.2',
date: 'Thu, 23 Dec 2021 18:57:14 +0000',
date: 'Thu, 23 Dec 2021 19:29:33 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -8813,10 +8813,14 @@
} else {
self.set_prompt('');
}
var bottom = self.is_bottom();
var interval = setInterval(function() {
var chr = $.terminal.substring(message, char_i, char_i + 1);
new_prompt += chr;
self.set_prompt(new_prompt);
if (chr === '\n' && bottom) {
self.scroll_to_bottom();
}
char_i++;
if (char_i === len) {
clearInterval(interval);
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit 66dcef1

Please sign in to comment.