source-academy / frontend

Frontend of Source Academy, an online experiential environment for computational thinking (React, Redux, Saga, Blueprint)
https://sourceacademy.org
Apache License 2.0
103 stars 168 forks source link

CSE Machine: Overlapping drawing of pairs #2716

Open deseansoh opened 11 months ago

deseansoh commented 11 months ago

When running the following code and attempting to display the environmental model in the CSE machine, the pairs constructed overlap with one another. The arrows are pointing correctly though.

const hh1 = pair(undefined, undefined);
const hh2 = pair(undefined, undefined);
const hh3 = pair(undefined, undefined);

set_head(hh1, hh1);
set_tail(hh1, hh1);

set_head(hh2, pair(undefined, hh2));
set_head(head(hh2), head(hh2));
set_tail(hh2, hh2);

set_head(hh3, pair(hh3,hh3));
set_tail(hh3, head(hh3));

Bug

martin-henz commented 11 months ago

I can confirm that the bug exists. Here is the share link: https://share.sourceacademy.org/t5pi8