From 96e6f8a09afaf7bc729b7e14eb0d72dd372ca9fd Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Tue, 23 Apr 2024 21:14:30 -0700
Subject: WIP: sight line and trace working again
---
src/modules/sightLine.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/modules/sightLine.js')
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;
--
cgit v1.2.3