File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ import {
7979 merge ,
8080 takeUntil
8181} from ' rxjs/operators'
82- import { Subject } from ' rxjs'
82+ import { Subject , merge as mergeObs } from ' rxjs'
8383export default {
8484 extends: {
8585 methods: fixedMethods,
@@ -154,10 +154,18 @@ export default {
154154 merge (this .touchTwoFinger$ ),
155155 map (this .calcTouchScaling )
156156 )
157+
158+ this .zoomFromNativeEvents = mergeObs (
159+ this .wheelZoom$ ,
160+ this .touchZoom$
161+ )
162+ .pipe (
163+ map (this .handleZoomEvent )
164+ )
165+
157166 this .zoomSubject$ = new Subject ().pipe (
158167 merge (this .setWH$ ),
159- merge (this .wheelZoom$ ),
160- merge (this .touchZoom$ )
168+ merge (this .zoomFromNativeEvents )
161169 )
162170 /** Drag Subject */
163171 this .dragSubject$ = new Subject ().pipe (
@@ -239,6 +247,10 @@ export default {
239247 area: {
240248 type: Number ,
241249 default: 50
250+ },
251+ handleZoomEvent: {
252+ type: Function ,
253+ default : val => val
242254 }
243255 },
244256 data () {
You can’t perform that action at this time.
0 commit comments