mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[d3-brush] Added keymodifiers definition (#42649)
This commit is contained in:
@@ -57,6 +57,12 @@ brush = brush.filter(function(d, i, group) {
|
||||
let filterFn: (this: SVGGElement, d: BrushDatum, index: number, group: SVGGElement[]) => boolean;
|
||||
filterFn = brush.filter();
|
||||
|
||||
// keyModifiers() ----------------------------------------------------------------
|
||||
|
||||
// chainable
|
||||
brush = brush.keyModifiers(true);
|
||||
const keyModifiers: boolean = brush.keyModifiers();
|
||||
|
||||
// handleSize() ----------------------------------------------------------------
|
||||
|
||||
// chainable
|
||||
|
||||
18
types/d3-brush/index.d.ts
vendored
18
types/d3-brush/index.d.ts
vendored
@@ -1,10 +1,10 @@
|
||||
// Type definitions for D3JS d3-brush module 1.0
|
||||
// Type definitions for D3JS d3-brush module 1.1
|
||||
// Project: https://github.com/d3/d3-brush/, https://d3js.org/d3-brush
|
||||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
// Last module patch version validated against: 1.0.3
|
||||
// Last module patch version validated against: 1.1.5
|
||||
|
||||
import { ArrayLike, Selection, TransitionLike, ValueFn } from 'd3-selection';
|
||||
|
||||
@@ -138,6 +138,20 @@ export interface BrushBehavior<Datum> {
|
||||
*/
|
||||
filter(filterFn: ValueFn<SVGGElement, Datum, boolean>): this;
|
||||
|
||||
/**
|
||||
* Returns the current key modifiers flag.
|
||||
*/
|
||||
keyModifiers(): boolean;
|
||||
/**
|
||||
* Sets the key modifiers flag and returns the brush.
|
||||
*
|
||||
* The key modifiers flag determines whether the brush listens to key events during brushing.
|
||||
* The default value is true.
|
||||
*
|
||||
* @param keyModifiers New value for key modifiers flag.
|
||||
*/
|
||||
keyModifiers(modifiers: boolean): this;
|
||||
|
||||
/**
|
||||
* Returns the current handle size, which defaults to six.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user