We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ed890c commit 0f61ac8Copy full SHA for 0f61ac8
src/lib/axes/canvas_text_bbox_calculator.ts
@@ -9,6 +9,9 @@ export class CanvasTextBBoxCalculator implements BBoxCalculator {
9
10
constructor(rootElement?: HTMLElement) {
11
this.offscreenCanvas = document.createElement('canvas');
12
+ this.offscreenCanvas.style.position = 'absolute';
13
+ this.offscreenCanvas.style.top = '-9999px';
14
+
15
this.context = this.offscreenCanvas.getContext('2d');
16
this.attachedRoot = rootElement || document.documentElement;
17
this.attachedRoot.appendChild(this.offscreenCanvas);
0 commit comments