|
|
|
@ -41,38 +41,7 @@ export type Options = {
|
|
|
|
|
from: number, |
|
|
|
|
to: number |
|
|
|
|
}; |
|
|
|
|
zoomEvents?: { |
|
|
|
|
mouse?: { |
|
|
|
|
zoom?: { // same as brush
|
|
|
|
|
isActive: boolean; |
|
|
|
|
keyEvent?: KeyEvent; // main(or base, or smth) / shift / alt / etc
|
|
|
|
|
orientation?: BrushOrientation; // to BrushOrientation: vertical, horizaontal, square, rectange
|
|
|
|
|
}, |
|
|
|
|
pan?: { |
|
|
|
|
isActive: boolean; |
|
|
|
|
keyEvent?: KeyEvent; // main(or base, or smth) / shift / alt / etc
|
|
|
|
|
orientation?: PanOrientation; |
|
|
|
|
}, |
|
|
|
|
doubleClick?: { |
|
|
|
|
isActive: boolean; |
|
|
|
|
keyEvent?: KeyEvent; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
scroll?: { |
|
|
|
|
zoom?: { |
|
|
|
|
isActive: boolean; |
|
|
|
|
keyEvent?: KeyEvent; |
|
|
|
|
orientation?: PanOrientation; // TODO: rename
|
|
|
|
|
}, |
|
|
|
|
pan?: { |
|
|
|
|
isActive: boolean; |
|
|
|
|
keyEvent?: KeyEvent; |
|
|
|
|
panStep?: number; |
|
|
|
|
orientation?: ScrollPanOrientation; |
|
|
|
|
direction?: ScrollPanDirection; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
zoomEvents?: ZoomEvents; |
|
|
|
|
renderTicksfromTimestamps?: boolean; |
|
|
|
|
renderLegend?: boolean; |
|
|
|
|
}; |
|
|
|
@ -187,3 +156,46 @@ export type SvgElParams = {
|
|
|
|
|
xScale: d3.ScaleLinear<number, number>, |
|
|
|
|
yScale: d3.ScaleLinear<number, number>, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type ZoomEvents = { |
|
|
|
|
mouse?: { |
|
|
|
|
zoom?: MouseZoomEvent; |
|
|
|
|
pan?: MousePanEvent; |
|
|
|
|
doubleClick?: DoubleClickEvent; |
|
|
|
|
}, |
|
|
|
|
scroll?: { |
|
|
|
|
zoom?: ScrollZoomEvent; |
|
|
|
|
pan?: ScrollPanEvent; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type MouseZoomEvent = { // same as brush
|
|
|
|
|
isActive?: boolean; |
|
|
|
|
keyEvent?: KeyEvent; // main(or base, or smth) / shift / alt / etc
|
|
|
|
|
orientation?: BrushOrientation; // to BrushOrientation: vertical, horizaontal, square, rectange
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type MousePanEvent = { // same as brush
|
|
|
|
|
isActive?: boolean; |
|
|
|
|
keyEvent?: KeyEvent; // main(or base, or smth) / shift / alt / etc
|
|
|
|
|
orientation?: PanOrientation; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type DoubleClickEvent = { |
|
|
|
|
isActive: boolean; |
|
|
|
|
keyEvent?: KeyEvent; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type ScrollZoomEvent = { |
|
|
|
|
isActive?: boolean; |
|
|
|
|
keyEvent?: KeyEvent; |
|
|
|
|
orientation?: PanOrientation; // TODO: rename
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type ScrollPanEvent = { |
|
|
|
|
isActive?: boolean; |
|
|
|
|
keyEvent?: KeyEvent; |
|
|
|
|
panStep?: number; |
|
|
|
|
orientation?: ScrollPanOrientation; |
|
|
|
|
direction?: ScrollPanDirection; |
|
|
|
|
} |
|
|
|
|