Skip to content

Commit

Permalink
#1866 sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Dec 17, 2024
1 parent 08ec978 commit 74f8d3d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const DetailViewGpx: React.FC = () => {
mapReference.current.innerHTML = "";
const container = L.DomUtil.get(mapReference.current);
if (container != null) {
(container as HTMLElement as unknown as { _leaflet_id: null })._leaflet_id = null;
(container as unknown as { _leaflet_id: null })._leaflet_id = null;
}

const tracks: [number, number][] = [];
Expand Down
12 changes: 6 additions & 6 deletions starsky/starsky/clientapp/src/hooks/use-capture-position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const capturePosition = () => {
const topCachedPosition = window.scrollY;
return {
freeze: () => {
(document.body as HTMLElement).style.position = "fixed";
(document.body as HTMLElement).style.top = `${topCachedPosition * -1}px`;
(document.body as HTMLElement).style.width = "100%";
document.body.style.position = "fixed";
document.body.style.top = `${topCachedPosition * -1}px`;
document.body.style.width = "100%";
},
unfreeze: () => {
(document.body as HTMLElement).style.position = "initial";
(document.body as HTMLElement).style.top = "initial";
(document.body as HTMLElement).style.width = "initial";
document.body.style.position = "initial";
document.body.style.top = "initial";
document.body.style.width = "initial";
window.scrollTo(0, topCachedPosition);
}
} as ICaptionPosition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class LeafletEmptyImageUrlTileLayer extends TileLayer {

tile.onload = L.Util.falseFn;
tile.onerror = L.Util.falseFn;
if (!(tile as HTMLImageElement).complete) {
if (!tile.complete) {
tile.src = EmptyImageUrl; // Replace emptyImageUrl
L.DomUtil.remove(tile);
delete this._tiles[i];
Expand Down

0 comments on commit 74f8d3d

Please sign in to comment.