You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@antv/g-plugin-canvas-picker

Package Overview
Dependencies
Maintainers
70
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-plugin-canvas-picker

A G plugin for picking in canvas

Source
npmnpm
Version
2.2.1
Version published
Maintainers
70
Created
Source

@antv/g-plugin-canvas-picker

基于 Canvas2D API 实现的拾取:

  • 使用 R-Tree 空间索引查找拾取点命中的一系列图形包围盒
  • 在这些图形中找到最顶层的一个图形,依据 z-index
  • 使用数学计算精确判定是否命中该图形,例如 Circle 测算到圆心距离是否小于半径

该方案基于 CPU,因此优化点在于包围盒相交运算是否足够快。

Keywords

antv

FAQs

Package last updated on 13 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts