L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
121 stars 22 forks source link

Map markers with no icon set display as broken images #31

Closed irisfofs closed 5 years ago

irisfofs commented 5 years ago

In my map I made several map markers as temporary TODOs to myself, and didn't give them icons. They show up like this after processing: image

The generated HTML looks like this:

<img class="map-marker" src="undefined">
<span class="map-marker-text">todo: Milsci, lasers, then iron mine</span>

The broken image from the undefined src looks pretty bad.

Some thoughts on solutions:

  1. Hide images with undefined srcs: img.map-marker[src="undefined"] { display: none; }
  2. Don't generate the img element if the src is undefined
  3. Use a simple dot image, maybe via SVG data URI or by adding a small marker image.
L0laapk3 commented 5 years ago

Do they actually not have any icon in game, or did it somehow fail exporting?

If they dont have an icon, how did you even generate them? Using mods? I'll probably end up adding an svg myself or something, yeah :p

Op za 9 mrt. 2019 04:05 schreef RS Rodgers-Schatz <notifications@github.com

:

In my map I made several map markers as temporary TODOs to myself, and didn't give them icons. They show up like this after processing: [image: image] https://user-images.githubusercontent.com/4063719/54065334-50718580-41d4-11e9-9954-35eef3b89fbc.png

The generated HTML looks like this:

todo: Milsci, lasers, then iron mine

The broken image from the undefined src looks pretty bad.

Some thoughts on solutions:

  1. Hide images with undefined srcs: img.map-marker[src="undefined"] { display: none; }
  2. Don't generate the img element if the src is undefined
  3. Use a simple dot image, maybe via SVG data URI or by adding a small marker image.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/L0laapk3/FactorioMaps/issues/31, or mute the thread https://github.com/notifications/unsubscribe-auth/AGBVz4wrnjAm6wq3iCXTq1Vvf3-4nfWPks5vUyTmgaJpZM4bmcdT .

irisfofs commented 5 years ago

They don't have icons in game. You don't have to set an icon when making one: image