Skip to content

Commit

Permalink
new prettier/eslint changed things
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudkucooland committed May 16, 2021
1 parent f02fc66 commit 68fa020
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 87 deletions.
10 changes: 4 additions & 6 deletions src/code/buttons/quickdrawButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,8 @@ const QuickDrawControl = L.Handler.extend({
// this._throwOrder = this._operation.nextOrder;
this._anchor1 = selectedPortal;
this._tooltip.updateContent(this._getTooltipText());
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchor1);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchor1);

this._guideA = L.geodesicPolyline(
[selectedPortal.latLng, selectedPortal.latLng],
Expand All @@ -308,9 +307,8 @@ const QuickDrawControl = L.Handler.extend({
color: this._nextDrawnLinksColor,
});
this._tooltip.updateContent(this._getTooltipText());
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY
] = JSON.stringify(this._anchor2);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY] =
JSON.stringify(this._anchor2);
this._guideB = L.geodesicPolyline(
[selectedPortal.latLng, selectedPortal.latLng],
guideStyle
Expand Down
42 changes: 21 additions & 21 deletions src/code/dialogs/homogeneous.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ const HomogeneousDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchorOne = WasabeePortal.getSelected();
if (this._anchorOne) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchorOne);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchorOne);
this._anchorDisplayOne.textContent = "";
this._anchorDisplayOne.appendChild(
this._anchorOne.displayFormat(this._smallScreen)
Expand All @@ -75,9 +74,8 @@ const HomogeneousDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchorTwo = WasabeePortal.getSelected();
if (this._anchorTwo) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY
] = JSON.stringify(this._anchorTwo);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY] =
JSON.stringify(this._anchorTwo);
this._anchorDisplayTwo.textContent = "";
this._anchorDisplayTwo.appendChild(
this._anchorTwo.displayFormat(this._smallScreen)
Expand All @@ -103,9 +101,8 @@ const HomogeneousDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchorThree = WasabeePortal.getSelected();
if (this._anchorThree) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_THREE_KEY
] = JSON.stringify(this._anchorThree);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_THREE_KEY] =
JSON.stringify(this._anchorThree);
this._anchorDisplayThree.textContent = "";
this._anchorDisplayThree.appendChild(
this._anchorThree.displayFormat(this._smallScreen)
Expand Down Expand Up @@ -654,28 +651,31 @@ const HomogeneousDialog = WDialog.extend({
this._operation.addLink(two, one, {
description: "Outer 1",
order: (depthValue * (depthValue - 1)) / 2 + depthValue + 1,
color: this._colors[
((depthValue * (depthValue - 1)) / 2 + depthValue + 1) %
this._colors.length
],
color:
this._colors[
((depthValue * (depthValue - 1)) / 2 + depthValue + 1) %
this._colors.length
],
replace: true,
});
this._operation.addLink(three, one, {
description: "Outer 2",
order: (depthValue * (depthValue - 1)) / 2 + 2 * depthValue + 2,
color: this._colors[
((depthValue * (depthValue - 1)) / 2 + 2 * depthValue + 2) %
this._colors.length
],
color:
this._colors[
((depthValue * (depthValue - 1)) / 2 + 2 * depthValue + 2) %
this._colors.length
],
replace: true,
});
this._operation.addLink(three, two, {
description: "Outer 3",
order: (depthValue * (depthValue - 1)) / 2 + 2 * depthValue + 2,
color: this._colors[
((depthValue * (depthValue - 1)) / 2 + 2 * depthValue + 2) %
this._colors.length
],
color:
this._colors[
((depthValue * (depthValue - 1)) / 2 + 2 * depthValue + 2) %
this._colors.length
],
replace: true,
});
draw(1, tree);
Expand Down
15 changes: 6 additions & 9 deletions src/code/dialogs/linkDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ const LinkDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._source = WasabeePortal.getSelected();
if (this._source) {
localStorage[
window.plugin.wasabee.static.constants.LINK_SOURCE_KEY
] = JSON.stringify(this._source);
localStorage[window.plugin.wasabee.static.constants.LINK_SOURCE_KEY] =
JSON.stringify(this._source);
this._sourceDisplay.textContent = "";
this._sourceDisplay.appendChild(
this._source.displayFormat(this._smallScreen)
Expand All @@ -73,9 +72,8 @@ const LinkDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchor1 = WasabeePortal.getSelected();
if (this._anchor1) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchor1);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchor1);
this._anchor1Display.textContent = "";
this._anchor1Display.appendChild(
this._anchor1.displayFormat(this._smallScreen)
Expand Down Expand Up @@ -115,9 +113,8 @@ const LinkDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchor2 = WasabeePortal.getSelected();
if (this._anchor2) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY
] = JSON.stringify(this._anchor2);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY] =
JSON.stringify(this._anchor2);
this._anchor2Display.textContent = "";
this._anchor2Display.appendChild(
this._anchor2.displayFormat(this._smallScreen)
Expand Down
10 changes: 4 additions & 6 deletions src/code/dialogs/madrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ const MadridDialog = MultimaxDialog.extend({
L.DomEvent.on(anchorOneButton, "click", () => {
this._anchorOne = WasabeePortal.getSelected();
if (this._anchorOne) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchorOne);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchorOne);
this._anchorOneDisplay.textContent = "";
this._anchorOneDisplay.appendChild(
this._anchorOne.displayFormat(this._smallScreen)
Expand Down Expand Up @@ -84,9 +83,8 @@ const MadridDialog = MultimaxDialog.extend({
L.DomEvent.on(anchorTwoButton, "click", () => {
this._anchorTwo = WasabeePortal.getSelected();
if (this._anchorTwo) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY
] = JSON.stringify(this._anchorTwo);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY] =
JSON.stringify(this._anchorTwo);
this._anchorTwoDisplay.textContent = "";
this._anchorTwoDisplay.appendChild(
this._anchorTwo.displayFormat(this._smallScreen)
Expand Down
5 changes: 2 additions & 3 deletions src/code/dialogs/markerAddDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ const MarkerAddDialog = WDialog.extend({
options
);
await this.update();
localStorage[
window.plugin.wasabee.static.constants.LAST_MARKER_KEY
] = selectedType;
localStorage[window.plugin.wasabee.static.constants.LAST_MARKER_KEY] =
selectedType;
},

_getAgentMenu: async function (menu) {
Expand Down
10 changes: 4 additions & 6 deletions src/code/dialogs/multimaxDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ const MultimaxDialog = WDialog.extend({
L.DomEvent.on(anchorOneButton, "click", () => {
this._anchorOne = WasabeePortal.getSelected();
if (this._anchorOne) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchorOne);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchorOne);
this._anchorOneDisplay.textContent = "";
this._anchorOneDisplay.appendChild(
this._anchorOne.displayFormat(this._smallScreen)
Expand All @@ -71,9 +70,8 @@ const MultimaxDialog = WDialog.extend({
L.DomEvent.on(anchorTwoButton, "click", () => {
this._anchorTwo = WasabeePortal.getSelected();
if (this._anchorTwo) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY
] = JSON.stringify(this._anchorTwo);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_TWO_KEY] =
JSON.stringify(this._anchorTwo);
this._anchorTwoDisplay.textContent = "";
this._anchorTwoDisplay.appendChild(
this._anchorTwo.displayFormat(this._smallScreen)
Expand Down
5 changes: 2 additions & 3 deletions src/code/dialogs/onionfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ const OnionfieldDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchor = WasabeePortal.getSelected();
if (this._anchor) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchor);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchor);
this._anchorDisplay.textContent = "";
this._anchorDisplay.appendChild(
this._anchor.displayFormat(this._smallScreen)
Expand Down
5 changes: 2 additions & 3 deletions src/code/dialogs/opSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ const OpSettingDialog = WDialog.extend({
}

if (writable) {
L.DomUtil.create("label", null, topSet).textContent = wX(
"REFERENCE_TIME"
);
L.DomUtil.create("label", null, topSet).textContent =
wX("REFERENCE_TIME");
const rtInput = L.DomUtil.create("input", null, topSet);
rtInput.size = 30;
rtInput.placeholder = "Sun, 21 Oct 2018 12:16:24 GMT";
Expand Down
5 changes: 2 additions & 3 deletions src/code/dialogs/opsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ const OpsDialog = WDialog.extend({
localStorage[
window.plugin.wasabee.static.constants.OPS_SHOW_HIDDEN_OPS
] !== "false";
localStorage[
window.plugin.wasabee.static.constants.OPS_SHOW_HIDDEN_OPS
] = !showHiddenOps;
localStorage[window.plugin.wasabee.static.constants.OPS_SHOW_HIDDEN_OPS] =
!showHiddenOps;
this.update();
};
buttons[wX("CLOSE")] = () => {
Expand Down
5 changes: 2 additions & 3 deletions src/code/dialogs/saveLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ const SaveLinksDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchor = WasabeePortal.getSelected();
if (this._anchor) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchor);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchor);
this._anchorDisplay.textContent = "";
this._anchorDisplay.appendChild(
this._anchor.displayFormat(this._smallScreen)
Expand Down
5 changes: 2 additions & 3 deletions src/code/dialogs/starburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ const StarburstDialog = WDialog.extend({
L.DomEvent.stop(ev);
this._anchor = WasabeePortal.getSelected();
if (this._anchor) {
localStorage[
window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY
] = JSON.stringify(this._anchor);
localStorage[window.plugin.wasabee.static.constants.ANCHOR_ONE_KEY] =
JSON.stringify(this._anchor);
this._anchorDisplay.textContent = "";
this._anchorDisplay.appendChild(
this._anchor.displayFormat(this._smallScreen)
Expand Down
5 changes: 2 additions & 3 deletions src/code/me.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ export default class WasabeeMe {
}

store() {
localStorage[Wasabee.static.constants.AGENT_INFO_KEY] = JSON.stringify(
this
);
localStorage[Wasabee.static.constants.AGENT_INFO_KEY] =
JSON.stringify(this);
}

remove() {
Expand Down
15 changes: 6 additions & 9 deletions src/code/selectedOp.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ export async function setupLocalStorage() {
}

function storeOpsList(ops) {
localStorage[
window.plugin.wasabee.static.constants.OPS_LIST_KEY
] = JSON.stringify(ops);
localStorage[window.plugin.wasabee.static.constants.OPS_LIST_KEY] =
JSON.stringify(ops);
}

//** This function removes an operation from the main list */
Expand All @@ -162,9 +161,8 @@ export async function addOperation(opID) {
export function showOperation(opID) {
const hiddenOps = hiddenOpsList();
if (hiddenOps.includes(opID)) {
localStorage[
window.plugin.wasabee.static.constants.OPS_LIST_HIDDEN_KEY
] = JSON.stringify(hiddenOps.filter((ID) => ID != opID));
localStorage[window.plugin.wasabee.static.constants.OPS_LIST_HIDDEN_KEY] =
JSON.stringify(hiddenOps.filter((ID) => ID != opID));
window.map.fire("wasabee:op:showhide", { opID: opID, show: true });
}
}
Expand All @@ -174,9 +172,8 @@ export function hideOperation(opID) {
const hiddenOps = hiddenOpsList();
if (!hiddenOps.includes(opID)) {
hiddenOps.push(opID);
localStorage[
window.plugin.wasabee.static.constants.OPS_LIST_HIDDEN_KEY
] = JSON.stringify(hiddenOps);
localStorage[window.plugin.wasabee.static.constants.OPS_LIST_HIDDEN_KEY] =
JSON.stringify(hiddenOps);
window.map.fire("wasabee:op:showhide", { opID: opID, show: false });
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/code/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,8 @@ export function GetWasabeeServer() {
localStorage[window.plugin.wasabee.static.constants.SERVER_BASE_KEY];
if (server == null) {
server = window.plugin.wasabee.static.constants.SERVER_BASE_DEFAULT;
localStorage[
window.plugin.wasabee.static.constants.SERVER_BASE_KEY
] = server;
localStorage[window.plugin.wasabee.static.constants.SERVER_BASE_KEY] =
server;
}
return server;
}
Expand Down
5 changes: 2 additions & 3 deletions src/code/skin.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ export function changeSkin(names) {
initOpsColor();
initAnchorIcon();

localStorage[
window.plugin.wasabee.static.constants.SKIN_KEY
] = JSON.stringify(validNames);
localStorage[window.plugin.wasabee.static.constants.SKIN_KEY] =
JSON.stringify(validNames);

addButtons();
window.map.fire("wasabeeUIUpdate", { reason: "skin change" }, false);
Expand Down
5 changes: 2 additions & 3 deletions src/code/uiCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ export function listenForPortalDetails(e) {
// see listenForPortalDetails above
export function getPortalDetails(guid) {
if (Array.isArray(guid)) {
window.plugin.wasabee.portalDetailQueue = window.plugin.wasabee.portalDetailQueue.concat(
guid
);
window.plugin.wasabee.portalDetailQueue =
window.plugin.wasabee.portalDetailQueue.concat(guid);
} else {
window.plugin.wasabee.portalDetailQueue.push(guid);
}
Expand Down

0 comments on commit 68fa020

Please sign in to comment.