add 100ms treshold before paning

This commit is contained in:
HF 2020-11-06 23:30:40 +01:00
parent d44556b6e2
commit af5aa9410e

View File

@ -323,6 +323,10 @@ class PixelPlainterControls {
const { store, isMouseDown } = this;
const state = store.getState();
if (isMouseDown) {
if (Date.now() < this.clickTabStartTime + 100) {
// 100ms treshold till starting to pan
return;
}
const { clickTabStartView, clickTabStartCoords } = this;
const [lastPosX, lastPosY] = clickTabStartView;
const deltaX = clientX - clickTabStartCoords[0];