* The returned locator pair can be the input of `dataToPoint` or `dataToLayout`. * * If point[0] is out of the matrix rect, * the out[0] is NaN; * else if it is on the right of top-left corner of body, * the out[0] is the oridinal number (>= 0). * else * out[0]
(
point: number[],
opt?: {
clamp?: MatrixClampOption | NullUndefined
},
out?: MatrixXYLocator[]
)
| 248 | * @implement |
| 249 | */ |
| 250 | pointToData( |
| 251 | point: number[], |
| 252 | opt?: { |
| 253 | clamp?: MatrixClampOption | NullUndefined |
| 254 | }, |
| 255 | out?: MatrixXYLocator[] |
| 256 | ): MatrixXYLocator[] { |
| 257 | const dims = this._dims; |
| 258 | pointToDataOneDimPrepareCtx(_tmpCtxPointToData, 0, dims, point, opt && opt.clamp); |
| 259 | pointToDataOneDimPrepareCtx(_tmpCtxPointToData, 1, dims, point, opt && opt.clamp); |
| 260 | |
| 261 | out = out || []; |
| 262 | out[0] = out[1] = NaN; |
| 263 | |
| 264 | if (_tmpCtxPointToData.y === CtxPointToDataAreaType.inCorner |
| 265 | && _tmpCtxPointToData.x === CtxPointToDataAreaType.inBody |
| 266 | ) { |
| 267 | pointToDataOnlyHeaderFillOut(_tmpCtxPointToData, out, 0, dims); |
| 268 | } |
| 269 | else if (_tmpCtxPointToData.x === CtxPointToDataAreaType.inCorner |
| 270 | && _tmpCtxPointToData.y === CtxPointToDataAreaType.inBody |
| 271 | ) { |
| 272 | pointToDataOnlyHeaderFillOut(_tmpCtxPointToData, out, 1, dims); |
| 273 | } |
| 274 | else { |
| 275 | pointToDataBodyCornerFillOut(_tmpCtxPointToData, out, 0, dims); |
| 276 | pointToDataBodyCornerFillOut(_tmpCtxPointToData, out, 1, dims); |
| 277 | } |
| 278 | |
| 279 | return out; |
| 280 | } |
| 281 | |
| 282 | convertToPixel( |
| 283 | ecModel: GlobalModel, |
nothing calls this directly
no test coverage detected