Socket
Book a DemoInstallSign in
Socket

@antv/g-plugin-canvas-picker

Package Overview
Dependencies
Maintainers
70
Versions
254
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

2.1.27
latest
Source
npmnpm
Version published
Weekly downloads
93K
2.81%
Maintainers
70
Weekly downloads
 
Created
Source

@antv/g-plugin-canvas-picker

基于 Canvas2D API 实现的拾取:

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

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

Keywords

antv

FAQs

Package last updated on 30 Jul 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.