remove tap event plugin

This commit is contained in:
Casper Lamboo 2021-05-05 18:55:43 +02:00
parent 02e312247c
commit 4879f47d4c
3 changed files with 2739 additions and 2729 deletions

5431
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -48,6 +48,7 @@
"react-redux": "^5.0.6", "react-redux": "^5.0.6",
"react-resize-detector": "^1.1.0", "react-resize-detector": "^1.1.0",
"react-svg-inline": "^2.0.1", "react-svg-inline": "^2.0.1",
"react-tap-event-plugin": "^3.0.3",
"redux-form": "^7.1.2", "redux-form": "^7.1.2",
"redux-undo": "^1.0.0-beta9-9-7", "redux-undo": "^1.0.0-beta9-9-7",
"reselect": "^3.0.1", "reselect": "^3.0.1",

View File

@ -418,24 +418,24 @@ export function traceDrag(position, start, id, screenMatrixContainer, screenMatr
}); });
}; };
} }
export function traceTap(position, objects, screenMatrixContainer, screenMatrixZoom) { // export function traceTap(position, objects, screenMatrixContainer, screenMatrixZoom) {
return async (dispatch, getState) => { // return async (dispatch, getState) => {
dispatch({ type: TRACE_TAP }); // dispatch({ type: TRACE_TAP });
//
const state = getState(); // const state = getState();
const id = objects.find(_id => state.sketcher.present.objectsById[_id].type === 'IMAGE_GUIDE'); // const id = objects.find(_id => state.sketcher.present.objectsById[_id].type === 'IMAGE_GUIDE');
//
if (id) { // if (id) {
const shapeData = state.sketcher.present.objectsById[id]; // const shapeData = state.sketcher.present.objectsById[id];
const traceStart = calculatePointInImage(position, shapeData, screenMatrixZoom); // const traceStart = calculatePointInImage(position, shapeData, screenMatrixZoom);
//
const { value: traceData } = await dispatch(floodFill(DEFAULT_TRACE_TOLERANCE, shapeData, traceStart)); // const { value: traceData } = await dispatch(floodFill(DEFAULT_TRACE_TOLERANCE, shapeData, traceStart));
//
return dispatch(traceFloodFill(traceData, shapeData)); // return dispatch(traceFloodFill(traceData, shapeData));
} else { // } else {
return dispatch(importImage()); // return dispatch(importImage());
} // }
}; // };
} }
export function importImage() { export function importImage() {