Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbloch committed Apr 5, 2024
1 parent 5968675 commit c2f9a7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/gui/gui-draw-lines2.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ export function initLineEditing(gui, ext, hit) {
} else {
deleteLastVertex(target);
}
if (getLastArcLength(target) < 2) {
gui.undo.undo(); // remove the path
}
if (e.shapes) {
replaceDrawnShapes(e.shapes);
}
if (getLastArcLength(target) < 2) {
gui.undo.undo(); // remove the path
}
});

function turnOn() {
Expand Down
4 changes: 3 additions & 1 deletion src/gui/gui-mouse.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export function MouseArea(element, pos) {
}
});
element.addEventListener('contextmenu', function(e) {
_self.dispatchEvent('contextmenu', procMouseEvent(e));
if (!e.ctrlKey) {
_self.dispatchEvent('contextmenu', procMouseEvent(e));
}
});

this.enable = function() {
Expand Down

0 comments on commit c2f9a7f

Please sign in to comment.