目录
当前位置: 首页 > 文档资料 > Snap.svg 英文文档 >

Snap.getElementByPoint(x, y)

优质
小牛编辑
136浏览
2023-12-01

Returns you topmost element under given point.

Returns: object Snap element object

Parameters

  1. xnumberx coordinate from the top left cornerof the window
  2. ynumbery coordinate from the top left cornerof the window

Usage

Snap.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"});