This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch fix/matrix-label-api
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 89d74145f0dee9e160d0777140901199d204da9c
Author: 100pah <[email protected]>
AuthorDate: Tue Jul 15 22:32:11 2025 +0800

    fix(matrix): Fix the quick path of query the host of the merged cell does 
not work.
---
 src/coord/matrix/MatrixBodyCorner.ts | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/coord/matrix/MatrixBodyCorner.ts 
b/src/coord/matrix/MatrixBodyCorner.ts
index 3dbc995ef..3d372c26b 100644
--- a/src/coord/matrix/MatrixBodyCorner.ts
+++ b/src/coord/matrix/MatrixBodyCorner.ts
@@ -141,7 +141,8 @@ export class MatrixBodyCorner<TKind extends 
MatrixBodyOrCornerKind> {
                     reasonArr = [];
                 }
                 parseCoordRangeOption(
-                    locatorRange, reasonArr, option.coord, self._dims, 
MatrixClampOption[self._kind]
+                    locatorRange, reasonArr, option.coord, self._dims,
+                    option.clamp ? MatrixClampOption[self._kind] : 
MatrixClampOption.none
                 );
                 if (isXYLocatorRangeInvalidOnDim(locatorRange, 0) || 
isXYLocatorRangeInvalidOnDim(locatorRange, 1)) {
                     if (__DEV__) {
@@ -262,8 +263,8 @@ export class MatrixBodyCorner<TKind extends 
MatrixBodyOrCornerKind> {
      */
     expandRangeByCellMerge(locatorRange: MatrixXYLocatorRange): void {
         if (
-            isXYLocatorRangeInvalidOnDim(locatorRange, 0)
-            && isXYLocatorRangeInvalidOnDim(locatorRange, 1)
+            !isXYLocatorRangeInvalidOnDim(locatorRange, 0)
+            && !isXYLocatorRangeInvalidOnDim(locatorRange, 1)
             && locatorRange[0][0] === locatorRange[0][1]
             && locatorRange[1][0] === locatorRange[1][1]
         ) {
@@ -272,7 +273,7 @@ export class MatrixBodyCorner<TKind extends 
MatrixBodyOrCornerKind> {
             _tmpERBCMLocator[0] = locatorRange[0][0];
             _tmpERBCMLocator[1] = locatorRange[1][0];
             const cell = this.getCell(_tmpERBCMLocator);
-            const inSpanOf = cell.inSpanOf;
+            const inSpanOf = cell && cell.inSpanOf;
             if (inSpanOf) {
                 cloneXYLocatorRange(locatorRange, inSpanOf.locatorRange);
                 return;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to