Skip to content

Commit 68b8669

Browse files
committed
remove some unused code in visualizer
1 parent 22d2c20 commit 68b8669

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

pylabrobot/visualizer/lib.js

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -614,36 +614,6 @@ class Container extends Resource {
614614
return this.liquids.reduce((acc, liquid) => acc + liquid.volume, 0);
615615
}
616616

617-
aspirate(volume) {
618-
if (volume > this.getVolume()) {
619-
throw new Error(
620-
`Aspirating ${volume}uL from well ${
621-
this.name
622-
} with ${this.getVolume()}uL`
623-
);
624-
}
625-
626-
// Remove liquids top down until we have removed the desired volume.
627-
let volumeToRemove = volume;
628-
for (let i = this.liquids.length - 1; i >= 0; i--) {
629-
const liquid = this.liquids[i];
630-
if (volumeToRemove >= liquid.volume) {
631-
volumeToRemove -= liquid.volume;
632-
this.liquids.splice(i, 1);
633-
} else {
634-
liquid.volume -= volumeToRemove;
635-
volumeToRemove = 0;
636-
}
637-
}
638-
639-
this.update();
640-
}
641-
642-
addLiquid(liquid) {
643-
this.liquids.push(liquid);
644-
this.update();
645-
}
646-
647617
setLiquids(liquids) {
648618
this.liquids = liquids;
649619
this.update();
@@ -661,19 +631,6 @@ class Container extends Resource {
661631
this.setLiquids(liquids);
662632
}
663633

664-
dispense(volume) {
665-
if (volume + this.volume > this.maxVolume) {
666-
throw new Error(
667-
`Adding ${volume}uL to well ${this.name} with ${this.volume}uL would exceed max volume of ${this.maxVolume}uL`
668-
);
669-
}
670-
671-
this.addLiquid({
672-
volume: volume,
673-
name: "Unknown liquid", // TODO: get liquid name from parameter?
674-
});
675-
}
676-
677634
serializeState() {
678635
return {
679636
liquids: this.liquids,

0 commit comments

Comments
 (0)