MCPcopy Create free account
hub / github.com/apache/echarts / containPoint

Method containPoint

src/coord/parallel/Parallel.ts:153–165  ·  view source on GitHub ↗
(point: number[])

Source from the content-addressed store, hash-verified

151 }
152
153 containPoint(point: number[]): boolean {
154 const layoutInfo = this._makeLayoutInfo();
155 const axisBase = layoutInfo.axisBase;
156 const layoutBase = layoutInfo.layoutBase;
157 const pixelDimIndex = layoutInfo.pixelDimIndex;
158 const pAxis = point[1 - pixelDimIndex];
159 const pLayout = point[pixelDimIndex];
160
161 return pAxis >= axisBase
162 && pAxis <= axisBase + layoutInfo.axisLength
163 && pLayout >= layoutBase
164 && pLayout <= layoutBase + layoutInfo.layoutLength;
165 }
166
167 getModel(): ParallelModel {
168 return this._model;

Callers 1

Calls 1

_makeLayoutInfoMethod · 0.95

Tested by

no test coverage detected