mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-11 03:25:45 +00:00
do not set lastPos on render(true). remove old code.
This commit is contained in:
parent
7981f8d749
commit
c805b80209
@ -139,6 +139,8 @@ The screen on which every other node renders.
|
|||||||
(not just full-width ones, elements with uniform cells to their sides).
|
(not just full-width ones, elements with uniform cells to their sides).
|
||||||
this is known to cause flickering with elements that are not full-width,
|
this is known to cause flickering with elements that are not full-width,
|
||||||
however, it is more optimal for terminal rendering.
|
however, it is more optimal for terminal rendering.
|
||||||
|
- **resizeTimeout** - amount of time (in ms) to redraw the screen after the
|
||||||
|
terminal is resized (default: 300).
|
||||||
|
|
||||||
##### Properties:
|
##### Properties:
|
||||||
|
|
||||||
|
@ -2003,7 +2003,6 @@ Box.prototype.render = function(stop) {
|
|||||||
|
|
||||||
// TODO: Possibly do both shrinkBox and shrink
|
// TODO: Possibly do both shrinkBox and shrink
|
||||||
// and use whichever values are higher.
|
// and use whichever values are higher.
|
||||||
// Slower than below, but more foolproof.
|
|
||||||
if (this.options.shrinkBox && this.children.length) {
|
if (this.options.shrinkBox && this.children.length) {
|
||||||
xl = 0, yl = 0;
|
xl = 0, yl = 0;
|
||||||
for (i = 0; i < this.children.length; i++) {
|
for (i = 0; i < this.children.length; i++) {
|
||||||
@ -2068,28 +2067,20 @@ Box.prototype.render = function(stop) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Won't work because parent is rendered first.
|
|
||||||
//if (this.options.shrinkBox && this._lastPos) {
|
|
||||||
// xl = this._lastPos.xl, yl = this._lastPos.yl;
|
|
||||||
//}
|
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// Calculate whether we moved/resized by checking the previous _lastPos.
|
// Calculate whether we moved/resized by checking the previous _lastPos.
|
||||||
// Maybe clear based on that. Possibly emit events here.
|
// Maybe clear based on that. Possibly emit events here.
|
||||||
ret = this._lastPos = {
|
ret = {
|
||||||
xi: xi_,
|
xi: xi_,
|
||||||
xl: xl,
|
xl: xl,
|
||||||
yi: yi_,
|
yi: yi_,
|
||||||
yl: yl,
|
yl: yl
|
||||||
//mxl: xl,
|
|
||||||
//myl: yl
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//this.parent._lastPos.mxl = Math.max(this.parent._lastPos.mxl, xl);
|
|
||||||
//this.parent._lastPos.myl = Math.max(this.parent._lastPos.myl, yl);
|
|
||||||
|
|
||||||
if (stop) return ret;
|
if (stop) return ret;
|
||||||
|
|
||||||
|
this._lastPos = ret;
|
||||||
|
|
||||||
battr = this.border
|
battr = this.border
|
||||||
? this.sattr(this.style.border, this.style.border.fg, this.style.border.bg)
|
? this.sattr(this.style.border, this.style.border.fg, this.style.border.bg)
|
||||||
: 0;
|
: 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user