zoom.filter()

zoom.filter([filter])

If filter is specified, sets the filter to the specified function and returns the zoom behavior. If filter is not specified, returns the current filter, which defaults to:

function filter() {
  return !event.button;
}

If the filter returns falsey, the initiating event is ignored and no zoom gestures are started. Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons, since those buttons are typically intended for other purposes, such as the context menu.

doc_D3_Js
2016-11-24 10:29:34
Comments
Leave a Comment

Please login to continue.