Skip to content

Commit

Permalink
Disabled the possibility to delete objects via hand tool
Browse files Browse the repository at this point in the history
  • Loading branch information
AlNedorezov committed Jul 28, 2017
1 parent c170d3a commit 743c4a6
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions front/js/app/tools/hand.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ function initHand() {
svgImgOnClickSelect(event);
}

function handleKeyUp(event) {
if (event.keyCode === 8 || event.keyCode === 46) {
svgImgDeleteSelectedPolygon();
}
}

/*global Tool*/
/*eslint no-undef: "error"*/
Tool.hand = function () {
Expand All @@ -23,11 +17,9 @@ function initHand() {
if (isButtonPressed) {
console.log("hand enabled");
svgImg.addEventListener("click", handleClicksOnSvgWithHandTool, true);
window.addEventListener("keyup", handleKeyUp, true);
} else {
console.log("hand disabled");
svgImg.removeEventListener("click", handleClicksOnSvgWithHandTool, true);
window.removeEventListener("keyup", handleKeyUp, true);
}
}
},
Expand Down

0 comments on commit 743c4a6

Please sign in to comment.