mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Fix some mangled JS syntax in tooltip.html (#93231)
## About The Pull Request So some source code pre-prettier was missing a few commas, which led to it looking a bit odd post-prettier. I found the old source block, fixed the issues, ran prettier again, and it's, uh, prettier now. ## Why It's Good For The Game Consistent code makes for less confusing changes (this entire debacle started because I didn't know why some variables were in parentheses and others weren't) No user facing changes.
This commit is contained in:
@@ -220,15 +220,15 @@
|
||||
//To improve our code. Thanks gooncoders, very cool
|
||||
var mapWidth = map["view-size"].x,
|
||||
mapHeight = map["view-size"].y,
|
||||
tilesShownX = tooltip.client_view_w;
|
||||
tilesShownY = tooltip.client_view_h;
|
||||
(realIconSizeX = mapWidth / tilesShownX),
|
||||
(realIconSizeY = mapHeight / tilesShownY),
|
||||
(resizeRatioX = realIconSizeX / tooltip.tileSize),
|
||||
(resizeRatioY = realIconSizeY / tooltip.tileSize),
|
||||
tilesShownX = tooltip.client_view_w,
|
||||
tilesShownY = tooltip.client_view_h,
|
||||
realIconSizeX = mapWidth / tilesShownX,
|
||||
realIconSizeY = mapHeight / tilesShownY,
|
||||
resizeRatioX = realIconSizeX / tooltip.tileSize,
|
||||
resizeRatioY = realIconSizeY / tooltip.tileSize,
|
||||
//Calculate letterboxing offsets
|
||||
(leftOffset = (map.size.x - mapWidth) / 2),
|
||||
(topOffset = (map.size.y - mapHeight) / 2);
|
||||
leftOffset = (map.size.x - mapWidth) / 2,
|
||||
topOffset = (map.size.y - mapHeight) / 2;
|
||||
|
||||
//alert(realIconSize + ' | ' +tooltip.tileSize + ' | ' + resizeRatio); //DEBUG
|
||||
|
||||
|
||||
Reference in New Issue
Block a user