@antv/g-lite 1.2.18 → 1.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9947,13 +9947,13 @@ var OffscreenCanvasCreator = /** @class */ (function () {
|
|
|
9947
9947
|
// user-defined offscreen canvas
|
|
9948
9948
|
if (offscreenCanvas || runtime.offscreenCanvas) {
|
|
9949
9949
|
this.canvas = offscreenCanvas || runtime.offscreenCanvas;
|
|
9950
|
-
this.context = this.canvas.getContext('2d', contextAttributes);
|
|
9950
|
+
this.context = this.canvas.getContext('2d', tslib.__assign({ willReadFrequently: true }, contextAttributes));
|
|
9951
9951
|
}
|
|
9952
9952
|
else {
|
|
9953
9953
|
try {
|
|
9954
9954
|
// OffscreenCanvas2D measureText can be up to 40% faster.
|
|
9955
9955
|
this.canvas = new window.OffscreenCanvas(0, 0);
|
|
9956
|
-
this.context = this.canvas.getContext('2d', contextAttributes);
|
|
9956
|
+
this.context = this.canvas.getContext('2d', tslib.__assign({ willReadFrequently: true }, contextAttributes));
|
|
9957
9957
|
if (!this.context || !this.context.measureText) {
|
|
9958
9958
|
this.canvas = document.createElement('canvas');
|
|
9959
9959
|
this.context = this.canvas.getContext('2d');
|
|
@@ -9961,7 +9961,7 @@ var OffscreenCanvasCreator = /** @class */ (function () {
|
|
|
9961
9961
|
}
|
|
9962
9962
|
catch (ex) {
|
|
9963
9963
|
this.canvas = document.createElement('canvas');
|
|
9964
|
-
this.context = this.canvas.getContext('2d', contextAttributes);
|
|
9964
|
+
this.context = this.canvas.getContext('2d', tslib.__assign({ willReadFrequently: true }, contextAttributes));
|
|
9965
9965
|
}
|
|
9966
9966
|
}
|
|
9967
9967
|
this.canvas.width = 10;
|