Skip to content

Commit

Permalink
Merge pull request #7 from GenZerg/main
Browse files Browse the repository at this point in the history
Fix the duplicate bug
  • Loading branch information
Nicezki authored Oct 27, 2023
2 parents 5f334d1 + 6ce6d46 commit e2dce5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ class ARMMane{

this.setupElementTrigger();

this.createDraggableList(this.elements["ui"]["function_box"][0].querySelector("div"));

this.initializeSortable();

}
Expand Down Expand Up @@ -1381,8 +1379,15 @@ class ARMMane{
// Fetch the presets and steps
this.getPreset()
.then(presetsWithSteps => {

// Remove the draggable list before creating new ones
this.elements["ui"]["function_box"][0].querySelector("div").innerHTML = "";

// Create the draggable list of elements
this.createDraggableList();

// Remove the preset list before creating new ones
this.elements["ui"]["preset_box"][0].querySelector("div").innerHTML = "";

// Create the preset list in the preset_box
this.createPresetList(presetsWithSteps);
Expand Down

0 comments on commit e2dce5e

Please sign in to comment.