Skip to content

Commit 6f86acb

Browse files
committed
Cleanup old code
1 parent 6a7c6c4 commit 6f86acb

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/ImageGallery.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ export default class ImageGallery extends React.Component {
5959
offsetPercentage: 0,
6060
galleryWidth: 0
6161
}
62-
63-
this._slideLeft = debounceEventHandler(this._slideLeft.bind(this), MIN_INTERVAL, true)
64-
this._slideRight = debounceEventHandler(this._slideRight.bind(this), MIN_INTERVAL, true)
65-
this._handleResize = this._handleResize.bind(this)
66-
this._handleKeyDown = this._handleKeyDown.bind(this)
6762
}
6863

6964
componentDidUpdate(prevProps, prevState) {
@@ -87,9 +82,15 @@ export default class ImageGallery extends React.Component {
8782
}
8883

8984
componentWillMount() {
85+
this._slideLeft = debounceEventHandler(
86+
this._slideLeft.bind(this), MIN_INTERVAL, true)
87+
88+
this._slideRight = debounceEventHandler(
89+
this._slideRight.bind(this), MIN_INTERVAL, true)
90+
91+
this._handleResize = this._handleResize.bind(this)
92+
this._handleKeyDown = this._handleKeyDown.bind(this)
9093
this._thumbnailDelay = 300
91-
this._ghotClickDelay = 600
92-
this._preventGhostClick = false
9394
}
9495

9596
componentDidMount() {

0 commit comments

Comments
 (0)