Skip to content

Commit

Permalink
Delete point bug
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn573 committed Jan 23, 2024
1 parent b0eb431 commit cd6e5d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _site/leaflet-treering.js
Original file line number Diff line number Diff line change
Expand Up @@ -3870,7 +3870,7 @@ function DeletePoint(Lt) {
* @function openDialog
*/
DeletePoint.prototype.openDialog = function(e, i) {
if (this.maintainAdjustment || (Lt.data.points[i].start && Lt.data.points[i - 1].break) || Lt.data.points[i].break) {
if (this.maintainAdjustment || (i > 0 && Lt.data.points[i].start && Lt.data.points[i - 1].break) || Lt.data.points[i].break) {
this.action(i);
} else {
Lt.helper.createEditToolDialog(e.containerPoint.x, e.containerPoint.y, i, "deletePoint");
Expand Down
2 changes: 1 addition & 1 deletion leaflet-treering.js
Original file line number Diff line number Diff line change
Expand Up @@ -3870,7 +3870,7 @@ function DeletePoint(Lt) {
* @function openDialog
*/
DeletePoint.prototype.openDialog = function(e, i) {
if (this.maintainAdjustment || (Lt.data.points[i].start && Lt.data.points[i - 1].break) || Lt.data.points[i].break) {
if (this.maintainAdjustment || (i > 0 && Lt.data.points[i].start && Lt.data.points[i - 1].break) || Lt.data.points[i].break) {
this.action(i);
} else {
Lt.helper.createEditToolDialog(e.containerPoint.x, e.containerPoint.y, i, "deletePoint");
Expand Down

0 comments on commit cd6e5d4

Please sign in to comment.