mudlet-map-renderer 0.0.9 → 0.0.12

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 0.0.12
2
+ - try to limit label font size to fit within label bounds
3
+
4
+ # 0.0.11
5
+ - another fix frame mode for background selection
6
+
7
+ # 0.0.10
8
+ - fix frame mode for background selection
9
+
1
10
  # 0.0.9
2
11
  - add transparent labels option
3
12
 
@@ -157,7 +157,7 @@ class Renderer {
157
157
  color = [114, 1, 0];
158
158
  }
159
159
  let roomColor = new paper.Color(color[0] / 255, color[1] / 255, color[2] / 255, 1);
160
- roomShape.fillColor = !this.settings.frameMode ? roomColor : new paper.Color(0, 0, 0);
160
+ roomShape.fillColor = !this.settings.frameMode ? roomColor : new paper.Color(this.settings.mapBackground);
161
161
  roomShape.strokeWidth = this.exitFactor;
162
162
  roomShape.strokeColor = !this.settings.borders || this.settings.frameMode ? roomColor : this.defualtColor;
163
163
 
@@ -527,7 +527,7 @@ class Renderer {
527
527
  }
528
528
  let text = new paper.PointText(background.bounds.center.add(0, 0.15));
529
529
  text.fillColor = new paper.Color(value.FgColor.r / 255, value.FgColor.g / 255, value.FgColor.b / 255);
530
- text.fontSize = 0.75;
530
+ text.fontSize = Math.min(0.75, value.Width / (value.Text.length / 2));
531
531
  text.content = value.Text;
532
532
  text.fontFamily = this.settings.fontFamily;
533
533
  text.justification = "center";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mudlet-map-renderer",
3
- "version": "0.0.9",
3
+ "version": "0.0.12",
4
4
  "keywords": [
5
5
  "mudlet",
6
6
  "map",