this.handleZoom = (event) => {
if (this.refDetailImage) {
if (this.state.thumbPath) this.setState({ thumbPath: '' })
let zoom = this.refDetailImage.style.zoom
zoom *= 0.6 + (event.wheelDelta + 240) / 600
if (zoom <= 1) {
zoom = 1
this.refTransition.style.transform = this.degRotate
this.dragPosition.left = 0
this.dragPosition.top = 0
} else if (zoom > 10000) {
zoom = 10000
} else {
this.dragPosition.left *= 0.6 + (event.wheelDelta + 240) / 600
this.dragPosition.top *= 0.6 + (event.wheelDelta + 240) / 600
this.refTransition.style.transform = `translate(${this.dragPosition.left}px,${this.dragPosition.top}px) ${this.degRotate}`
}
this.refContainer.style.overflow = ''
this.refDetailImage.style.zoom = zoom
}
}