Skip to content

Commit bbac1ac

Browse files
authored
Merge pull request #747 from hyoo-ru/touch-zoom
$mol_touch zoom_next return fix
2 parents 37f7e27 + 5a24646 commit bbac1ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

touch/touch.view.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ namespace $.$$ {
303303
if( action_type === 'zoom' ) {
304304

305305
const zoom_prev = this.zoom() || 0.001
306-
const zoom_next = zoom_prev * ( 1 - .001 * Math.min( event.deltaY, 100 ) )
306+
let zoom_next = zoom_prev * ( 1 - .001 * Math.min( event.deltaY, 100 ) )
307+
zoom_next = this.zoom( zoom_next )
307308
const mult = zoom_next / zoom_prev
308-
this.zoom( zoom_next )
309309

310310
const pan_prev = this.pan()
311311
const center = this.pointer_center()!

0 commit comments

Comments
 (0)