mudlet-map-renderer 0.0.7 → 0.0.10
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
|
@@ -74,12 +74,7 @@ class Controls {
|
|
|
74
74
|
toolPan.activate();
|
|
75
75
|
toolPan.onMouseDrag = (event) => {
|
|
76
76
|
this.element.style.cursor = "all-scroll";
|
|
77
|
-
let bounds = this.renderer.getBounds();
|
|
78
|
-
let viewBounds = this.view.getBounds();
|
|
79
77
|
let delta = event.downPoint.subtract(event.point);
|
|
80
|
-
if (viewBounds.x < bounds.x) {
|
|
81
|
-
this.view.translate(delta);
|
|
82
|
-
}
|
|
83
78
|
this.view.translate(delta.negate());
|
|
84
79
|
this.isDrag = true;
|
|
85
80
|
};
|
|
@@ -24,6 +24,7 @@ class Settings {
|
|
|
24
24
|
this.uniformLevelSize = false;
|
|
25
25
|
this.fontFamily = 'sans-serif';
|
|
26
26
|
this.mapBackground = "#000000";
|
|
27
|
+
this.transparentLabels = false;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -156,7 +157,9 @@ class Renderer {
|
|
|
156
157
|
color = [114, 1, 0];
|
|
157
158
|
}
|
|
158
159
|
let roomColor = new paper.Color(color[0] / 255, color[1] / 255, color[2] / 255, 1);
|
|
159
|
-
|
|
160
|
+
if (!this.settings.frameMode) {
|
|
161
|
+
roomShape.fillColor = roomColor;
|
|
162
|
+
}
|
|
160
163
|
roomShape.strokeWidth = this.exitFactor;
|
|
161
164
|
roomShape.strokeColor = !this.settings.borders || this.settings.frameMode ? roomColor : this.defualtColor;
|
|
162
165
|
|
|
@@ -521,7 +524,9 @@ class Renderer {
|
|
|
521
524
|
label.scale(this.roomFactor * 0.08, -this.roomFactor * 0.08);
|
|
522
525
|
} else {
|
|
523
526
|
let background = new paper.Path.Rectangle(new paper.Point(value.X, value.Y - value.Height), new paper.Size(value.Width, value.Height));
|
|
524
|
-
|
|
527
|
+
if (!this.settings.transparentLabels) {
|
|
528
|
+
background.fillColor = new paper.Color(value.BgColor.r / 255, value.BgColor.g / 255, value.BgColor.b / 255);
|
|
529
|
+
}
|
|
525
530
|
let text = new paper.PointText(background.bounds.center.add(0, 0.15));
|
|
526
531
|
text.fillColor = new paper.Color(value.FgColor.r / 255, value.FgColor.g / 255, value.FgColor.b / 255);
|
|
527
532
|
text.fontSize = 0.75;
|