SHARE
TWEET

Untitled

a guest Jun 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 这是一个d3的brush组件。
  2. 内部主要是circleBrush.js,通过js类的应用,能同时创建多个不相互冲突的brush组件.
  3. 由于刷选需要监听keydown和keyup(shift按键),需要加tabindex属性,让块元素获得焦点(keydown和keyup事件才能响应)。
  4. 操作:按住shift键,使用鼠标进行刷选。然后对点进行右键选择,会提示选择了哪些点(这部分是个回调,需要注明把点的哪个数据返回)。
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top