Skip to content

Commit 8a8315a

Browse files
committed
fix: multitouch improvement
1 parent 28a1389 commit 8a8315a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/store/ChartAdapterStore.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,10 @@ export default class ChartAdapterStore {
252252
if (chartNode && this.scrollableChartParent && !this.mainStore.state.isVerticalScrollEnabled) {
253253
if (this.touchValues.multiTouch) {
254254
if (e.type === 'touchend') {
255-
if (!this.touchValues.touchIds?.length) {
256-
this.touchValues = { multiTouch: false };
257-
} else {
258-
this.touchValues.touchIds = this.touchValues.touchIds?.filter(
259-
id => id === e.changedTouches[0].identifier
260-
);
261-
}
255+
this.touchValues.touchIds = this.touchValues.touchIds?.filter(
256+
id => id === e.changedTouches[0].identifier
257+
);
258+
this.touchValues = { multiTouch: !!this.touchValues.touchIds?.length };
262259
}
263260
return;
264261
}

0 commit comments

Comments
 (0)