简体   繁体   English

D3-brush 禁用 SHIFT 锁定 x/y 位置

[英]D3-brush disable SHIFT locking x/y position

From the documentation of d3-brush ( https://alexdeng.github.io/ab-stats/d3/CHANGES/#brushes-d3-brush ): "Holding down SHIFT (⇧) while brushing locks the x- or y-position of the brush."来自 d3-brush 的文档( https://alexdeng.github.io/ab-stats/d3/CHANGES/#brushes-d3-brush ):“刷牙时按住 SHIFT (⇧) 会锁定 x- 或 y-刷子的位置。”

How do I turn of this behaviour?我该如何改变这种行为?

I figured it out.我想到了。 When constructing your brush with brush.call(d3.brush().on(... add the keyModifiers(false) argument: brush.call(d3.brush().keyModifiers(false).on(...使用brush.call(d3.brush().on(...添加keyModifiers(false)参数brush.call(d3.brush().keyModifiers(false).on(...brush.call(d3.brush().keyModifiers(false).on(...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM