Skip to content

Commit

Permalink
Revert awkward feature to scroll in Selection mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Miroito committed Sep 3, 2022
1 parent 1291651 commit 67c00af
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions frontend/pages/recipe/_slug/ocr-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -721,19 +721,6 @@ export default defineComponent({
if (state.isImageSmallerThanCanvas) return;
if (state.canvasRect === null || state.canvas === null || state.ctx === null) return;
if (state.canvasMode === "selection") {
event.preventDefault();
updateMousePos(event);
const m = Math.sign(event.deltaY);
state.imagePosition.dy = state.imagePosition.dy + m * state.imagePosition.dHeight * scrollSensitivity;
keepImageInCanvas();
updateImageScale();
state.ctx.fillStyle = "rgb(255, 255, 255)";
state.ctx.fillRect(0, 0, state.canvas.width, state.canvas.height);
drawImage(state.ctx);
}
if (state.canvasMode === "panAndZoom") {
event.preventDefault();
Expand Down

0 comments on commit 67c00af

Please sign in to comment.