remove tap event plugin

pull/6/head
Casper Lamboo 2 years ago
parent 02e312247c
commit 4879f47d4c
  1. 5431
      package-lock.json
  2. 1
      package.json
  3. 36
      src/actions/index.js

5431
package-lock.json generated

File diff suppressed because it is too large Load Diff

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

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

Loading…
Cancel
Save