diff --git a/es/Divider.d.ts b/es/Divider.d.ts index 379ca583..ef984670 100644 --- a/es/Divider.d.ts +++ b/es/Divider.d.ts @@ -31,8 +31,8 @@ export declare class Divider extends React.PureComponent { boxData: BoxDataCache; startDrag: (e: DragState) => void; dragMove: (e: DragState) => void; - dragMove2(e: DragState, dx: number, dy: number): void; - dragMoveAll(e: DragState, dx: number, dy: number): void; + dragMove2(dx: number, dy: number): void; + dragMoveAll(dx: number, dy: number): void; dragEnd: (e: DragState) => void; render(): React.ReactNode; } diff --git a/es/Divider.js b/es/Divider.js index 1f488792..ed89b0d3 100644 --- a/es/Divider.js +++ b/es/Divider.js @@ -56,10 +56,10 @@ export class Divider extends React.PureComponent { }; this.dragMove = (e) => { if (e.event.shiftKey || e.event.ctrlKey || e.event.altKey) { - this.dragMoveAll(e, e.dx, e.dy); + this.dragMoveAll(e.dx, e.dy); } else { - this.dragMove2(e, e.dx, e.dy); + this.dragMove2(e.dx, e.dy); } }; this.dragEnd = (e) => { @@ -70,7 +70,7 @@ export class Divider extends React.PureComponent { } }; } - dragMove2(e, dx, dy) { + dragMove2(dx, dy) { let { isVertical, changeSizes } = this.props; let { beforeDivider, afterDivider } = this.boxData; if (!(beforeDivider.length && afterDivider.length)) { @@ -98,7 +98,7 @@ export class Divider extends React.PureComponent { sizes[beforeDivider.length] = rightSize; changeSizes(sizes); } - dragMoveAll(e, dx, dy) { + dragMoveAll(dx, dy) { let { isVertical, changeSizes } = this.props; let { beforeSize, beforeMinSize, afterSize, afterMinSize, beforeDivider, afterDivider } = this.boxData; let d = isVertical ? dy : dx; diff --git a/lib/Divider.d.ts b/lib/Divider.d.ts index 379ca583..ef984670 100644 --- a/lib/Divider.d.ts +++ b/lib/Divider.d.ts @@ -31,8 +31,8 @@ export declare class Divider extends React.PureComponent { boxData: BoxDataCache; startDrag: (e: DragState) => void; dragMove: (e: DragState) => void; - dragMove2(e: DragState, dx: number, dy: number): void; - dragMoveAll(e: DragState, dx: number, dy: number): void; + dragMove2(dx: number, dy: number): void; + dragMoveAll(dx: number, dy: number): void; dragEnd: (e: DragState) => void; render(): React.ReactNode; } diff --git a/lib/Divider.js b/lib/Divider.js index 6772040c..aac3fb5b 100644 --- a/lib/Divider.js +++ b/lib/Divider.js @@ -78,10 +78,10 @@ class Divider extends React.PureComponent { }; this.dragMove = (e) => { if (e.event.shiftKey || e.event.ctrlKey || e.event.altKey) { - this.dragMoveAll(e, e.dx, e.dy); + this.dragMoveAll(e.dx, e.dy); } else { - this.dragMove2(e, e.dx, e.dy); + this.dragMove2(e.dx, e.dy); } }; this.dragEnd = (e) => { @@ -92,7 +92,7 @@ class Divider extends React.PureComponent { } }; } - dragMove2(e, dx, dy) { + dragMove2(dx, dy) { let { isVertical, changeSizes } = this.props; let { beforeDivider, afterDivider } = this.boxData; if (!(beforeDivider.length && afterDivider.length)) { @@ -120,7 +120,7 @@ class Divider extends React.PureComponent { sizes[beforeDivider.length] = rightSize; changeSizes(sizes); } - dragMoveAll(e, dx, dy) { + dragMoveAll(dx, dy) { let { isVertical, changeSizes } = this.props; let { beforeSize, beforeMinSize, afterSize, afterMinSize, beforeDivider, afterDivider } = this.boxData; let d = isVertical ? dy : dx; diff --git a/src/Divider.tsx b/src/Divider.tsx index dbf54fd4..78065f45 100644 --- a/src/Divider.tsx +++ b/src/Divider.tsx @@ -89,13 +89,13 @@ export class Divider extends React.PureComponent { }; dragMove = (e: DragState) => { if (e.event.shiftKey || e.event.ctrlKey || e.event.altKey) { - this.dragMoveAll(e, e.dx, e.dy); + this.dragMoveAll(e.dx, e.dy); } else { - this.dragMove2(e, e.dx, e.dy); + this.dragMove2(e.dx, e.dy); } }; - dragMove2(e: DragState, dx: number, dy: number) { + dragMove2(dx: number, dy: number) { let {isVertical, changeSizes} = this.props; let {beforeDivider, afterDivider} = this.boxData; if (!(beforeDivider.length && afterDivider.length)) { @@ -124,7 +124,7 @@ export class Divider extends React.PureComponent { changeSizes(sizes); } - dragMoveAll(e: DragState, dx: number, dy: number) { + dragMoveAll(dx: number, dy: number) { let {isVertical, changeSizes} = this.props; let {beforeSize, beforeMinSize, afterSize, afterMinSize, beforeDivider, afterDivider} = this.boxData; let d = isVertical ? dy : dx;