diff --git a/README.md b/README.md index d77cf53b1b822975a7b2af0a64a84ea11a7070cc..09948c09f0d8e81b8b647d1878faf53ff035baee 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,6 @@ # swindows -A window management library for Synchronet JS (and TypeScript) modules. - -## Comparison with frame.js - -**swindows** can be more than 10 times faster than **frame.js**: - - - - -The performance gap narrows when very large windows or window transparency are in use, but **swindows** remains about 5x faster. +A window management library for Synchronet JS (and TypeScript) modules. In tests, it's up to 11 times faster than frame.js. ## Usage diff --git a/assets/frame.js-demo.webm b/assets/frame.js-demo.webm deleted file mode 100644 index 474b66dcb7fd5ca57a976590794309de61f9475f..0000000000000000000000000000000000000000 Binary files a/assets/frame.js-demo.webm and /dev/null differ diff --git a/assets/swindows-demo.webm b/assets/swindows-demo.webm deleted file mode 100644 index ab335848d2fc3e5431d84b4b2d1f9030ac5d3e6a..0000000000000000000000000000000000000000 Binary files a/assets/swindows-demo.webm and /dev/null differ diff --git a/src/Window.ts b/src/Window.ts index fe08f725b22005d8ca923f150e240b73a27a1828..2ddc7e09453de8ed70f8dd62dadc5c1d2b6ac4cc 100644 --- a/src/Window.ts +++ b/src/Window.ts @@ -120,8 +120,8 @@ export default class Window extends BaseWindow { if (this._buffer.length >= this._scrollBack.height) { this._buffer.shift(); this.scroll(0, -1); - this.offset.y = Math.min(this.offset.y, this._buffer.length - this.size.height); - if (this._cursor.y === position.y) this._cursor.y--; + if (this.offset.y > 0) this.offset.y = this.offset.y - 1; + if (this._cursor.y > 0) this._cursor.y--; } }