Skip to content

Commit

Permalink
improve chunk loading when using panning
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed Mar 19, 2022
1 parent b2ac135 commit 344d42c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
14 changes: 1 addition & 13 deletions components/map/controlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,7 @@ export class PanningControler {
this.cache.refresh({
x: this.center.current.x - stop[0] / 2,
y: this.center.current.y + stop[1] / 2
}, this.scale.current / 2,
this.windowSize.height / this.windowSize.width);

this.cache.refresh({
x: this.center.current.x,
y: this.center.current.y + stop[1] / 2
}, this.scale.current / 2,
this.windowSize.height / this.windowSize.width);

this.cache.refresh({
x: this.center.current.x - stop[0] / 2,
y: this.center.current.y
}, this.scale.current / 2,
}, this.scale.current * 2,
this.windowSize.height / this.windowSize.width);
}

Expand Down
1 change: 1 addition & 0 deletions styles/Map.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.map {
width : 100%;
height : 100%;
background-color: #2e515c;
display : block;
position : fixed;
top : 0;
Expand Down

0 comments on commit 344d42c

Please sign in to comment.