@project-gridmap/library 0.1.1 → 0.1.2
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/package.json +2 -2
- package/src/gridmap.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@project-gridmap/library",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A content-agnostic hierarchical grid map renderer
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "A content-agnostic hierarchical grid map renderer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"module": "./src/index.js",
|
package/src/gridmap.js
CHANGED
|
@@ -720,7 +720,7 @@ export class Gridmap {
|
|
|
720
720
|
const h = layer.height * this.camera.k;
|
|
721
721
|
const text = layer.label.toUpperCase();
|
|
722
722
|
if (h < text.length * 7.5) continue;
|
|
723
|
-
const el = createElement('div', { text
|
|
723
|
+
const el = createElement('div', { text }, this.overlay);
|
|
724
724
|
Object.assign(el.style, {
|
|
725
725
|
position: 'absolute',
|
|
726
726
|
left: `${X(layer.x) - 22}px`,
|
|
@@ -746,7 +746,7 @@ export class Gridmap {
|
|
|
746
746
|
const label = text.length * 7.3 + 20 <= w ? text : number.length * 7.3 + 14 <= w ? number : null;
|
|
747
747
|
if (!label) continue;
|
|
748
748
|
|
|
749
|
-
const el = createElement('div', { text }, this.overlay);
|
|
749
|
+
const el = createElement('div', { text: label }, this.overlay);
|
|
750
750
|
Object.assign(el.style, {
|
|
751
751
|
position: 'absolute',
|
|
752
752
|
left: `${X(item.x) + 5}px`,
|