Reversible mempool block visualization
This commit is contained in:
@@ -42,6 +42,24 @@ export default class BlockScene {
|
||||
}
|
||||
}
|
||||
|
||||
setOrientation(orientation: string, flip: boolean): void {
|
||||
this.orientation = orientation;
|
||||
this.flip = flip;
|
||||
this.dirty = true;
|
||||
const startTime = performance.now();
|
||||
Object.values(this.txs).forEach(txView => {
|
||||
this.saveGridToScreenPosition(txView);
|
||||
this.applyTxUpdate(txView, {
|
||||
display: {
|
||||
position: txView.screenPosition,
|
||||
color: txView.getColor()
|
||||
},
|
||||
duration: 0
|
||||
});
|
||||
this.setTxOnScreen(txView, startTime, 0);
|
||||
});
|
||||
}
|
||||
|
||||
// Destroy the current layout and clean up graphics sprites without any exit animation
|
||||
destroy(): void {
|
||||
Object.values(this.txs).forEach(tx => tx.destroy());
|
||||
|
||||
Reference in New Issue
Block a user