mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-22 16:59:28 +00:00
fix hide/show error.
This commit is contained in:
parent
db001078b2
commit
796a3f0ddd
@ -582,6 +582,7 @@ Element.prototype.emit = function(type) {
|
||||
*/
|
||||
|
||||
Element.prototype.hide = function() {
|
||||
if (this.hidden) return;
|
||||
var ret = this.render(true);
|
||||
this.hidden = true;
|
||||
this.screen.clearRegion(ret.xi, ret.xl, ret.yi, ret.yl);
|
||||
@ -589,6 +590,7 @@ Element.prototype.hide = function() {
|
||||
};
|
||||
|
||||
Element.prototype.show = function() {
|
||||
if (!this.hidden) return;
|
||||
this.hidden = false;
|
||||
//this.render();
|
||||
this.emit('show');
|
||||
|
Loading…
x
Reference in New Issue
Block a user