mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 00:03:47 +00:00
Subtract 2 rows from mobile viewport to fully clear accessory bar
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -309,11 +309,11 @@ const XTERM_HTML = `<!DOCTYPE html>
|
||||
var vpWidth = window.innerWidth;
|
||||
var vpHeight = window.innerHeight;
|
||||
var cols = Math.floor(vpWidth / cellWidth);
|
||||
// Why: subtract 1 row so the bottom terminal line is never covered
|
||||
// Why: subtract 2 rows so the bottom terminal line is never covered
|
||||
// by the accessory bar. The WebView's innerHeight can slightly
|
||||
// overstate the visible area due to layout timing or safe-area
|
||||
// insets, causing the last row to render behind the overlay.
|
||||
var rows = Math.max(8, Math.floor(vpHeight / cellHeight) - 1);
|
||||
// insets, causing the last rows to render behind the overlay.
|
||||
var rows = Math.max(8, Math.floor(vpHeight / cellHeight) - 2);
|
||||
notify({ type: 'measure-result', cols: cols, rows: rows });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user