Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-04-23 21:14:30 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-04-23 21:14:30 -0700
commit96e6f8a09afaf7bc729b7e14eb0d72dd372ca9fd (patch)
tree2e916cb653ec260905e5773aaf056f6c8a9cfb8f /src/modules/sightLine.js
parentf60969ef8dc72d3b97c5abb9f637171d2a6f2921 (diff)
WIP: sight line and trace working again
Diffstat (limited to 'src/modules/sightLine.js')
-rw-r--r--src/modules/sightLine.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/sightLine.js b/src/modules/sightLine.js
index de88521..4790bd8 100644
--- a/src/modules/sightLine.js
+++ b/src/modules/sightLine.js
@@ -170,8 +170,8 @@ export default class SightLine {
update(cell, { x, y }) {
const sl = this.svg.querySelector('.sight-line'),
target = this.svg.querySelector('.sight-line-target').parentElement,
- x1 = cell.parentElement.dataset.x,
- y1 = cell.parentElement.parentElement.dataset.y,
+ x1 = cell.dataset.x,
+ y1 = cell.parentElement.dataset.y,
x2 = target.dataset.x,
y2 = target.parentElement.dataset.y;