@galacean/engine-core 1.5.2 → 1.5.3
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/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -1
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/module.js
CHANGED
|
@@ -36638,7 +36638,8 @@ __decorate([
|
|
|
36638
36638
|
// Based on the specific version of the engine implementation, when actualBoundingBoxLeft is not supported, width is used to represent the rendering width, and `textAlign` uses the default value `start` and direction is left to right.
|
|
36639
36639
|
// Some devices do not support actualBoundingBoxLeft and actualBoundingBoxRight in TextMetrics.
|
|
36640
36640
|
// Examples: Google Pixel 2 XL (Android 11), Honor 6X (Android 8).
|
|
36641
|
-
|
|
36641
|
+
// In WeChat Mini Games, TextMetrics may be reported as not defined, so a check for window.TextMetrics is added.
|
|
36642
|
+
if (window.TextMetrics && !("actualBoundingBoxLeft" in TextMetrics.prototype)) {
|
|
36642
36643
|
Object.defineProperties(TextMetrics.prototype, {
|
|
36643
36644
|
actualBoundingBoxLeft: {
|
|
36644
36645
|
get: function get() {
|