Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions modules/core/src/lib/deck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,23 +485,8 @@ export default class Deck<ViewsT extends ViewOrViews = null> {
// Update the animation loop
this.animationLoop?.setProps(resolvedProps);

if (
props.useDevicePixels !== undefined &&
this.device?.canvasContext?.canvas instanceof HTMLCanvasElement
) {
// TODO: It would be much cleaner if CanvasContext had a setProps method
this.device.canvasContext.props.useDevicePixels = props.useDevicePixels;
const canvas = this.device.canvasContext.canvas;
const entry = {
target: canvas,
contentBoxSize: [{inlineSize: canvas.clientWidth, blockSize: canvas.clientHeight}],
devicePixelContentBoxSize: [
{inlineSize: canvas.clientWidth, blockSize: canvas.clientHeight}
],
borderBoxSize: [{inlineSize: canvas.clientWidth, blockSize: canvas.clientHeight}]
};
// Access the protected _handleResize method through the canvas context
(this.device.canvasContext as any)._handleResize([entry]);
if (props.useDevicePixels !== undefined && this.device?.canvasContext) {
this.device.canvasContext.setProps({useDevicePixels: props.useDevicePixels});
}

// If initialized, update sub manager props
Expand Down
Loading