summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-04-05 23:23:21 +0200
committerAki <please@ignore.pl>2021-04-05 23:23:21 +0200
commit926cc5d1751314a18c0e3056243c0a12e804d81c (patch)
tree779bee16fc7fb060b9585aeb158a5ef84e984ae0
parent94e69f0b64b08d0a18cce0572efe1821393b884d (diff)
downloadderelict-prototype-926cc5d1751314a18c0e3056243c0a12e804d81c.zip
derelict-prototype-926cc5d1751314a18c0e3056243c0a12e804d81c.tar.gz
derelict-prototype-926cc5d1751314a18c0e3056243c0a12e804d81c.tar.bz2
Added stub of labels
-rw-r--r--derelict.js1
-rw-r--r--style.css13
2 files changed, 14 insertions, 0 deletions
diff --git a/derelict.js b/derelict.js
index 2bb47c7..2471104 100644
--- a/derelict.js
+++ b/derelict.js
@@ -54,6 +54,7 @@ class Wreck {
this.killmail = killmail
this.domElement.className = 'wreck'
+ this.domElement.dataset.label = `${this.killmail.killmail_id}`
this.domElement.appendChild(iconElement)
this.point.position.copy(position)
this.point.add(object2d)
diff --git a/style.css b/style.css
index bbeb91b..472cbd8 100644
--- a/style.css
+++ b/style.css
@@ -21,6 +21,19 @@ body {
border: 2px solid #eee;
}
+.wreck::after {
+ display: block;
+ content: attr(data-label);
+ color: #eee;
+ position: absolute;
+ top: 0;
+ left: 107.5%;
+ padding: 0.2em 0.5em;
+ background: #000a;
+ border-radius: 0.5em;
+ pointer-events: none;
+}
+
#wrapper {
display: flex;
width: 100vw;