Skip to content

Commit

Permalink
dont fade/blink tile images
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyGalbreath committed May 31, 2024
1 parent 03efc40 commit 1b7465d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/src/layer/LiveTileLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ export class LiveTileLayer extends L.TileLayer {
tile.setAttribute('loaded', 'true');
}

_tileOnError(done: L.DoneCallback, tile: HTMLElement, e: Error): void {
_tileOnError(done: L.DoneCallback, tile: HTMLImageElement, e: Error): void {
super._tileOnError(done, tile, e);
tile.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
tile.setAttribute('loaded', 'false');
}

Expand All @@ -73,7 +74,6 @@ export class LiveTileLayer extends L.TileLayer {
// callback is called when the tile has been loaded.
createTile(coords: L.Coords, done: L.DoneCallback): HTMLImageElement {
const tile: HTMLImageElement = L.DomUtil.create('img');
tile.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
tile.setAttribute('loaded', 'false');

L.DomEvent.on(tile, 'load', L.Util.bind(this._tileOnLoad, this, done, tile));
Expand Down
1 change: 0 additions & 1 deletion web/src/scss/livemap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ img.leaflet-tile {
image-rendering: -moz-crisp-edges;
border: 0 !important;
opacity: 1;
transition: opacity .5s;

/* See: https://github.com/GoogleChrome/lighthouse/issues/15497#issuecomment-2047385179 */
mix-blend-mode: color-dodge !important;
Expand Down

0 comments on commit 1b7465d

Please sign in to comment.