Skip to content

Commit

Permalink
Escape should only trigger Add Core inactivation once
Browse files Browse the repository at this point in the history
  • Loading branch information
PrafulB committed Jan 31, 2024
1 parent 804ec01 commit 1ab3d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drawCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,11 @@ function drawCoresOnCanvasForTravelingAlgorithm() {
window.viewer.removeAllHandlers("canvas-drag-end")
} else {
document.addEventListener("keydown", (e) => {
e.preventDefault()
if (e.key === 'Escape') {
e.preventDefault()
addCoreHandler()
}
})
}, {once: true})
addCoreBtn.classList.add("active")
window.viewer.canvas.style.cursor = "crosshair"

Expand Down

0 comments on commit 1ab3d87

Please sign in to comment.