tpwalke2 / BlueMapSignMarkers

Fabric plugin for BlueMap that displays markers based on in-game signs
MIT License
2 stars 2 forks source link

Custom icons results in weird behavior #80

Closed damondriscoll closed 2 months ago

damondriscoll commented 2 months ago

The icon won’t anchor correctly to its relative map location, I assume it’s not applying the correct CSS? Even manually assigning the icon as “assets/poi.svg” breaks it

tpwalke2 commented 2 months ago

Can you share a screenshot showing the behavior?

damondriscoll commented 2 months ago

Yes, I’ll update by tomorrow night

damondriscoll commented 2 months ago

I found out the issue - apparently the default anchor settings (0, 0) are messed up, as for SVGs at least, it completely breaks them! I used anchor settings found on the BlueMap website (25, 45), and they work as intended.

(25, 45), correct image

(0, 0), wrong, becomes more obvious when scaled out image

I'll create the PR tomorrow shouldn't be that difficult (i think)

tpwalke2 commented 2 months ago

I don't think a PR is necessary as this is working as designed. The offsetX and offsetY are read from the config and allow users to modify the location for each marker type (https://github.com/tpwalke2/BlueMapSignMarkers?tab=readme-ov-file#marker-groups).