MCPcopy Create free account
hub / github.com/codeaashu/claude-code / _mergePages

Method _mergePages

src/server/web/public/terminal.js:7655–7666  ·  view source on GitHub ↗
(e3, t3)

Source from the content-addressed store, hash-verified

7653 this.pages.push(n2), this._requestClearModel = true, this._onAddTextureAtlasCanvas.fire(n2.canvas);
7654 }
7655 const e3 = new v(this._document, this._textureSize);
7656 return this._pages.push(e3), this._activePages.push(e3), this._onAddTextureAtlasCanvas.fire(e3.canvas), e3;
7657 }
7658 _mergePages(e3, t3) {
7659 const i3 = 2 * e3[0].canvas.width, s3 = new v(this._document, i3, e3);
7660 for (const [r2, o2] of e3.entries()) {
7661 const e4 = r2 * o2.canvas.width % i3, n2 = Math.floor(r2 / 2) * o2.canvas.height;
7662 s3.ctx.drawImage(o2.canvas, e4, n2);
7663 for (const s4 of o2.glyphs) s4.texturePage = t3, s4.sizeClipSpace.x = s4.size.x / i3, s4.sizeClipSpace.y = s4.size.y / i3, s4.texturePosition.x += e4, s4.texturePosition.y += n2, s4.texturePositionClipSpace.x = s4.texturePosition.x / i3, s4.texturePositionClipSpace.y = s4.texturePosition.y / i3;
7664 this._onRemoveTextureAtlasCanvas.fire(o2.canvas);
7665 const a2 = this._activePages.indexOf(o2);
7666 -1 !== a2 && this._activePages.splice(a2, 1);
7667 }
7668 return s3;
7669 }

Callers 1

_createNewPageMethod · 0.95

Calls 3

entriesMethod · 0.80
fireMethod · 0.80
spliceMethod · 0.80

Tested by

no test coverage detected