Remove edge search
This commit is contained in:
parent
d041bcd9bb
commit
3f208bb29c
@ -87,11 +87,8 @@ class Zones extends Phaser.Scene {
|
|||||||
drawEdges(edgeData) {
|
drawEdges(edgeData) {
|
||||||
this.graphics.clear();
|
this.graphics.clear();
|
||||||
edgeData.forEach((e) => {
|
edgeData.forEach((e) => {
|
||||||
const drawEdge = this.nodes.filter(n => (
|
const nodeA = this.nodes[e[0]];
|
||||||
e[0] === n.id || e[1] === n.id
|
const nodeB = this.nodes[e[1]];
|
||||||
));
|
|
||||||
const nodeA = this.nodes[drawEdge[0].id];
|
|
||||||
const nodeB = this.nodes[drawEdge[1].id];
|
|
||||||
if (nodeA.success && nodeB.success) {
|
if (nodeA.success && nodeB.success) {
|
||||||
this.graphics.lineStyle(10, 0xfff00f, 0.2);
|
this.graphics.lineStyle(10, 0xfff00f, 0.2);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user