Skip to content

Commit

Permalink
fix(cad): allow a snap distance of 0 (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
oterral authored Jan 25, 2021
1 parent 2a451c9 commit 8eebfaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/control/cad.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class CadControl extends Control {

document.getElementById('width-input').addEventListener('keyup', (evt) => {
const snapPointDist = parseFloat(evt.target.value);
if (snapPointDist) {
if (!Number.isNaN(snapPointDist)) {
this.setProperties({ snapPointDist });
}
});
Expand Down

0 comments on commit 8eebfaf

Please sign in to comment.