mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-22 02:38:15 +00:00
improved algorithm for calculating player name location
This commit is contained in:
@@ -169,7 +169,7 @@ export class GameRenderer {
|
||||
this.scale /= zoomFactor;
|
||||
|
||||
// Clamp the scale to prevent extreme zooming
|
||||
this.scale = Math.max(0.1, Math.min(10, this.scale));
|
||||
this.scale = Math.max(0.1, Math.min(15, this.scale));
|
||||
|
||||
const canvasRect = this.canvas.getBoundingClientRect();
|
||||
const canvasX = event.x - canvasRect.left;
|
||||
|
||||
Reference in New Issue
Block a user