Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ArduinoFrontend/src/app/Libs/inputs/Buttons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export class SlideSwitch extends CircuitElement {
*/
constructor(public canvas: any, x: number, y: number) {
super('SlideSwitch', x, y, 'SlideSwitch.json', canvas);
this.setDragListeners();
}
/**
* Initialize Slide Switch
Expand Down Expand Up @@ -283,6 +284,7 @@ export class SlideSwitch extends CircuitElement {
*/
closeSimulation(): void {
this.elements.unclick();
this.elements.undrag();
this.setDragListeners();
this.setClickListener(null);
const anim = Raphael.animation({ transform: `t${this.tx},${this.ty}` }, 500);
Expand Down