babylonjs-accessibility 6.18.0 → 6.19.1
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.
@@ -31433,7 +31433,10 @@ class HTMLTwinHostComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
31433
31433
|
const curMesh = curNode;
|
31434
31434
|
const adt = curMesh.material?.getActiveTextures()[0];
|
31435
31435
|
const guiRoot = adt.getChildren();
|
31436
|
-
|
31436
|
+
const twinItems = this._getHTMLTwinItemsFromGUI(guiRoot);
|
31437
|
+
if (twinItems.length > 0) {
|
31438
|
+
result.push(new _htmlTwinNodeItem__WEBPACK_IMPORTED_MODULE_4__.HTMLTwinNodeItem(curNode, this.props.scene, twinItems));
|
31439
|
+
}
|
31437
31440
|
}
|
31438
31441
|
else if (curNode.accessibilityTag) {
|
31439
31442
|
result.push(new _htmlTwinNodeItem__WEBPACK_IMPORTED_MODULE_4__.HTMLTwinNodeItem(curNode, this.props.scene, this._getHTMLTwinItemsFromNodes(curNode.getChildren())));
|
@@ -31442,7 +31445,7 @@ class HTMLTwinHostComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
31442
31445
|
queue.push(...curNode.getChildren());
|
31443
31446
|
}
|
31444
31447
|
}
|
31445
|
-
return result;
|
31448
|
+
return this._emptyTree(result) ? [] : result;
|
31446
31449
|
}
|
31447
31450
|
_hasChildrenWithA11yTag(node) {
|
31448
31451
|
let result = false;
|
@@ -31455,6 +31458,9 @@ class HTMLTwinHostComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
31455
31458
|
}
|
31456
31459
|
return result;
|
31457
31460
|
}
|
31461
|
+
_emptyTree(tree) {
|
31462
|
+
return tree.length === 0 || (tree.length === 1 && tree[0].children.length === 0 && tree[0].description === "");
|
31463
|
+
}
|
31458
31464
|
_getHTMLTwinItemsFromGUI(rootItems) {
|
31459
31465
|
if (!rootItems || rootItems.length === 0) {
|
31460
31466
|
return [];
|
@@ -31477,7 +31483,7 @@ class HTMLTwinHostComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
31477
31483
|
result.push(new _htmlTwinGUIItem__WEBPACK_IMPORTED_MODULE_3__.HTMLTwinGUIItem(curNode, this.props.scene, []));
|
31478
31484
|
}
|
31479
31485
|
}
|
31480
|
-
return result;
|
31486
|
+
return this._emptyTree(result) ? [] : result;
|
31481
31487
|
}
|
31482
31488
|
_isFullscreenGUI(texture) {
|
31483
31489
|
return texture.getClassName() === "AdvancedDynamicTexture" && !!(texture.layer && !texture.layer.isBackground);
|