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

Method _refreshCanvasDimensions

src/server/web/public/terminal.js:1076–1078  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1074 this._colorZoneStore.setPadding({ full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.full), left: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.left), center: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.center), right: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * c.right) }), this._lastKnownBufferLength = this._bufferService.buffers.normal.lines.length;
1075 }
1076 _refreshCanvasDimensions() {
1077 this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this._coreBrowserService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowserService.dpr), this._refreshDrawConstants(), this._refreshColorZonePadding();
1078 }
1079 _refreshDecorations() {
1080 this._shouldUpdateDimensions && this._refreshCanvasDimensions(), this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height), this._colorZoneStore.clear();
1081 for (const e4 of this._decorationService.decorations) this._colorZoneStore.addDecoration(e4);

Callers 2

constructorMethod · 0.80
_refreshDecorationsMethod · 0.80

Calls 2

_refreshDrawConstantsMethod · 0.80

Tested by

no test coverage detected