Skip to content

Commit

Permalink
CreateBreak disable & dialog close bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn573 committed Jan 23, 2024
1 parent cd6e5d4 commit 3a7a095
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
9 changes: 1 addition & 8 deletions Leaflet.DataAccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function ViewData(Inte) {

ViewData.prototype.disable = function() {
this.btn.state('inactive');
// this.active = false;
this.active = false;
Inte.viewDataDialog.close();
}
}
Expand Down Expand Up @@ -103,13 +103,6 @@ function ViewDataDialog(Inte) {
}).addTo(Inte.treering.viewer);
this.dialog.hideClose();

// $(this.dialog._map).on('dialog:closed', (event) => {
// console.log(this.dialog)
// Inte.viewData.btn.state('inactive');
// Inte.viewData.active = false;
// if (Inte.deleteData?.dialog) Inte.deleteData.dialog.close();
// });

this.scrollPositionFromTop = 0;

/**
Expand Down
2 changes: 1 addition & 1 deletion Template.AreaCapture.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h3>
<h4 class="AreaCapture-lassoInstruction-header">Selecting ellipses to delete or re-date:</h4>
<p class="AreaCapture-lassoInstruction-text">Use the lasso tool to click, drag, and encircle existing ellipses in order to delete or change calendar year dating. When selected, ellipses appear as yellow.</p>
<p class="AreaCapture-lassoInstruction-text">Deselect ellipses by using the lasso tool again.</p>
<p class="AreaCapture-lassoInstruction-text"><b>Use ESC or Right-Click to disable lasso tool.</b></p>
<p class="AreaCapture-lassoInstruction-text"><b>Use Right-Click to disable lasso tool.</b></p>

<div class="AreaCapture-lasso-toggle">
<label><input type="checkbox" id="AreaCapture-lasso-btn"><span>Do not show message again.</span></label>
Expand Down
6 changes: 3 additions & 3 deletions _site/leaflet-treering.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function LTreering (viewer, basePath, options, base_layer, gl_layer) {
// Disable all tools w/ esc.
L.DomEvent.on(window, 'keydown', (e) => {
if (e.keyCode == 27) {
this.disableTools();
this.disableTools();
}
}, this);

Expand Down Expand Up @@ -3792,7 +3792,7 @@ function CreateBreak(Lt) {
this.enable();
Lt.mouseLine.from(Lt.data.points[Lt.data.index - 1].latLng);
},
() => { this.disable }
() => { this.disable() }
);

L.DomEvent.on(window, 'keydown', (e) => {
Expand Down Expand Up @@ -5084,7 +5084,7 @@ function Helper(Lt) {
document.getElementById("shift-radioB").checked = !Lt[tool].adjustOuter;

$(this.dialog._map).on("dialog:resizeend", () => { console.log(this.dialog) });
$(this.dialog._map).on("dialog:closed", () => {
$(this.dialog._closeNode).on("click", (e) => {
if (this.dialog) {
// Only have user select adjustment once per activation.
Lt[tool].selectedAdjustment = true;
Expand Down
6 changes: 3 additions & 3 deletions leaflet-treering.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function LTreering (viewer, basePath, options, base_layer, gl_layer) {
// Disable all tools w/ esc.
L.DomEvent.on(window, 'keydown', (e) => {
if (e.keyCode == 27) {
this.disableTools();
this.disableTools();
}
}, this);

Expand Down Expand Up @@ -3792,7 +3792,7 @@ function CreateBreak(Lt) {
this.enable();
Lt.mouseLine.from(Lt.data.points[Lt.data.index - 1].latLng);
},
() => { this.disable }
() => { this.disable() }
);

L.DomEvent.on(window, 'keydown', (e) => {
Expand Down Expand Up @@ -5084,7 +5084,7 @@ function Helper(Lt) {
document.getElementById("shift-radioB").checked = !Lt[tool].adjustOuter;

$(this.dialog._map).on("dialog:resizeend", () => { console.log(this.dialog) });
$(this.dialog._map).on("dialog:closed", () => {
$(this.dialog._closeNode).on("click", (e) => {
if (this.dialog) {
// Only have user select adjustment once per activation.
Lt[tool].selectedAdjustment = true;
Expand Down

0 comments on commit 3a7a095

Please sign in to comment.