Skip to content

Commit

Permalink
Merge pull request #498 from theopensystemslab/ian/reset-icon-direction
Browse files Browse the repository at this point in the history
style: Reset icon direction reverse
  • Loading branch information
ianjon3s authored Sep 6, 2024
2 parents a313267 + cb0c49b commit 88833cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/my-map/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function resetControl(listener: any, icon: string) {
button.title = "Reset map view";

if (icon === "unicode") {
button.innerHTML = "";
button.innerHTML = "";
} else {
const image = document.createElement("img");
image.className = "reset-icon";
Expand Down Expand Up @@ -140,7 +140,7 @@ export class PrintControl extends PrintDialog {
?.getControls()
.getArray()
.filter(
(control: Control) => control instanceof ScaleLine
(control: Control) => control instanceof ScaleLine,
)[0] as ScaleLine;
if (!scaleLineControl) return;
// @ts-ignore
Expand Down Expand Up @@ -176,10 +176,10 @@ export class PrintControl extends PrintDialog {
?.getControls()
.getArray()
.filter(
(control) => control instanceof CanvasScaleLine
(control) => control instanceof CanvasScaleLine,
)[0] as CanvasScaleLine;
const canvasScaleLine = document.querySelector(
".ol-scale-line-inner"
".ol-scale-line-inner",
) as HTMLDivElement;
const scale = Math.round(scaleLineControl.getScaleForResolution());
if (canvasScaleLine) {
Expand Down

0 comments on commit 88833cd

Please sign in to comment.