waibu-maps 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,9 +141,9 @@ class WaibuMaps { // eslint-disable-line no-unused-vars
141
141
  this.map.addImage(src.name, image.data)
142
142
  }
143
143
 
144
- loadIcon = async (icon) => {
144
+ loadIcon = async (icon, prefix) => {
145
145
  if (this.map.listImages().includes(icon)) return
146
- const href = this.iconPrefix + icon.split(':')[1]
146
+ const href = (prefix ?? this.iconPrefix) + icon.split(':')[1]
147
147
  const image = await this.map.loadImage(href)
148
148
  if (!this.map.listImages().includes(icon)) this.map.addImage(icon, image.data)
149
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-maps",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Maps for Waibu MPA",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-02-25
4
+
5
+ - [2.2.1] Bug fix on ```wmaps.loadIcon()```
6
+
3
7
  ## 2026-02-18
4
8
 
5
9
  - [2.2.0] Update attribute functions from ```waibu```