Descriptive Problem Summary:
Tried using the zoom/icon-size skinparams, but neither seem to work.
Expected Results:
When zoom=1 or icon-size=48 BYOND should display the map at 48x48 per tile.
Actual Results:
Tiles are larger than 48x48.
Does the problem occur:
Every time? Or how often?
Every time.
When does the problem NOT occur?
The problem can be mitigated by manually setting the width/height of the map control.
However: The map is completely black if icon-size is used together with setting a width&height.
Workarounds:
Manually set the width and height of the map (div) element.
ID:1670090
Aug 30 2014, 9:31 pm
|
|||||||||||||
Resolved
| |||||||||||||
Aug 31 2014, 11:29 am
|
|
I have not observed any issues with either zoom=0 or zoom=1, which are the only values we currently support. Do you have a test project that shows this?
|
This is my game.dms file:
<style> world.icon_size=48 Neither zoom=1 nor icon-size=48 work. Expected results: Icons are scaled to 48x48 and will never become bigger. Actual results: Icons are scaled to 62x62. Workaround: Replace "436px" with "336px" in my .dms sample. |
In response to Sir Lazarus
|
|
Sir Lazarus wrote:
This is my game.dms file: |
Kaiochao: whoops :)
Sir Lazarus: :P Kaiochao: can you try putting winset(src, "map", "zoom=1") in Login() Sir Lazarus: works! Kaiochao: i'll consider that my redemption |
So apparently zoom isn't being respected at startup. I'll find out what I can.
|
Lummox JR resolved issue with message:
map.zoom did not take effect at load time. |
Using 507.1255, I can confirm that this has not been fixed (if the issue is on the dart code on the website itself, the version is mostly irrelevant).
|
Please provide a test project that shows the issue in action. I tried this and got it to work when I tested.
|
The test project you sent has zoom=2, which is not supported per the documentation. The map is therefore behaving as expected by falling back on zoom 0.
|
In response to Lummox JR
|
|
Am I missing something? In the project I sent I never use zoom=2.
In the skin I set zoom to 1. <div id="map" byondclass="map" skinparams="is-default:1;zoom:1"></div> This does not have any effect on the display. However, if I somewhere I set it with a winset call: winset(src, "map", "zoom=1") Then it works as intended. |
The project you sent me via the pager has its map set to icon size 32, but the world's icon size is 16. So it's set to icon-size=32 and zoom=2 in the .dmf file.
|
Based on the discrepancy between the two icon sizes, it overwrites what's set in the .dms file?
Because what I'm getting at is I never directly wrote "zoom=2" or the like. Is it being set automatically? |
Ah, right, the .dms should override the .dmf. I believe the issue is that the skinparams setting is formatted incorrectly. I ran into this a few times myself by accident, but it's really meant to parse much like a winset command, so it should look like this:
<div id="map" byondclass="map" isdefault=1 skinparams="zoom=1"></div> |
In response to Lummox JR
|
|
Oh jeez, I didn't realize that! In that case, there is no issue here.
Thanks, and sorry for wasting your time! |
No problem. I've got bitten by the skinparams thing enough (I think we were both confusing it for a style-like syntax) that I might modify how that's parsed.
|
On further review this behavior is not desirable for translated .dmf skins, and has been disabled for those per id:1677401. For regular new .dms-based skins, the startup value of map.zoom will be respected.
|