This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch next-test in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 07b785eb18b34d47a784545b889d215ed8e41154 Author: Ovilia <[email protected]> AuthorDate: Mon Jun 23 19:42:52 2025 +0800 fix(graph): fix graph maxZ2 --- src/util/graphic.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/util/graphic.ts b/src/util/graphic.ts index a2838adac..0ef96b804 100644 --- a/src/util/graphic.ts +++ b/src/util/graphic.ts @@ -785,16 +785,18 @@ export function traverseUpdateZ( z: number, zlevel: number, ): void { - doUpdateZ(el, z, zlevel); + doUpdateZ(el, z, zlevel, -Infinity); } function doUpdateZ( el: Element, z: number, - zlevel: number + zlevel: number, + // FIXME: ideally all the labels shold be above all the glyphs by default, + // e.g. in graph, edge labels should be above node elements. + // currenly impl does not garaentee that. + maxZ2: number, ): number { - let maxZ2 = -Infinity; - // `ignoreModelZ` is used to intentionally lift elements to cover other elements, // where maxZ2 (for label.z2) should also not be counted for its parents. if ((el as ExtendedElement).ignoreModelZ) { @@ -815,6 +817,7 @@ function doUpdateZ( children[i], z, zlevel, + maxZ2 ), maxZ2 ); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
