You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/04/13 07:05:54 UTC

[GitHub] [echarts] pissang commented on a diff in pull request #16861: fix: markArea display filter correction

pissang commented on code in PR #16861:
URL: https://github.com/apache/echarts/pull/16861#discussion_r849142993


##########
src/coord/cartesian/Cartesian2D.ts:
##########
@@ -105,6 +106,18 @@ class Cartesian2D extends Cartesian<Axis2D> implements CoordinateSystem {
             && this.getAxis('y').containData(data[1]);
     }
 
+    containZone(data1: ScaleDataValue[], data2: ScaleDataValue[]): boolean {
+        const zoneCorner1 = this.dataToPoint(data1);
+        const zoneCorner2 = this.dataToPoint(data2);
+        const area = this.getArea();
+        return rectRectIntersect(

Review Comment:
   We can use the exist `BoundingRect#intersect` method to check if two rect overlaps.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org