Skip to content

Commit

Permalink
Remove unused parameter in Divider component method
Browse files Browse the repository at this point in the history
  • Loading branch information
slavamuravey authored and rinick committed Jun 17, 2024
1 parent 1e60500 commit 69ccf97
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions es/Divider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export declare class Divider extends React.PureComponent<DividerProps, any> {
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;
}
Expand Down
8 changes: 4 additions & 4 deletions es/Divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/Divider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export declare class Divider extends React.PureComponent<DividerProps, any> {
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;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/Divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ export class Divider extends React.PureComponent<DividerProps, any> {
};
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)) {
Expand Down Expand Up @@ -124,7 +124,7 @@ export class Divider extends React.PureComponent<DividerProps, any> {
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;
Expand Down

0 comments on commit 69ccf97

Please sign in to comment.