Store z-index for drawing order

This commit is contained in:
Anthony Kim
2026-02-12 10:27:32 -08:00
parent d4c3b693bb
commit 677e5275f9
4 changed files with 33 additions and 7 deletions
@@ -510,12 +510,13 @@ export class KittyGraphicsHandler implements IApcHandler, IResetHandler {
const wantsBottom = cmd.zIndex !== undefined && cmd.zIndex < 0;
const layer: ImageLayer = (wantsBottom && this._coreTerminal.options.allowTransparency) ? 'bottom' : 'top';
const zIndex = cmd.zIndex ?? 0;
let storageId: number;
if (w !== bitmap.width || h !== bitmap.height) {
const resized = await createImageBitmap(bitmap, { resizeWidth: w, resizeHeight: h });
storageId = this._storage.addImage(resized, layer);
storageId = this._storage.addImage(resized, layer, zIndex);
} else {
storageId = this._storage.addImage(bitmap, layer);
storageId = this._storage.addImage(bitmap, layer, zIndex);
}
this._kittyIdToStorageId.set(image.id, storageId);