Skip to content

Commit

Permalink
fix: pointer arrows from heap to heap
Browse files Browse the repository at this point in the history
  • Loading branch information
arturo32 authored Dec 2, 2024
1 parent 4572f9f commit cd6713f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion memoryCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export default {
this.createPointerArrow();
}
},
unmounted() {
if(this.variable[1][2][0] === '*' || this.variable[1][2] === 'pointer') {
if(globalArrows.has(this.address + this.content)) {
globalArrows.get(this.address + this.content).remove();
}
}
},
methods: {
createPointerArrow() {
if(this.content !== '?') {
Expand All @@ -44,7 +51,7 @@ export default {
{
path: 'fluid',
startSocket: 'right',
endSocket: isPointedCellHeap? 'left' : 'right',
endSocket: isPointedCellHeap? (this.isInHeap? 'right' : 'left') : 'right',
startSocketGravity: isPointedCellHeap? [15, 0] : [15, 0],
endSocketGravity: isPointedCellHeap? [-20, 0] : [20, 0],
endPlug: 'arrow3',
Expand Down

0 comments on commit cd6713f

Please sign in to comment.