Skip to content

Commit

Permalink
Merge pull request #15 from dennyhappysomuch/module12-task2
Browse files Browse the repository at this point in the history
Правки
  • Loading branch information
kvakazyambra authored Dec 27, 2024
2 parents ce70901 + a192821 commit bafd062
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions js/form-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ const setSlider = () => {
}
};

const startFilterHandler = (evt) => {
const onEffectChange = (evt) => {
filterActive = evt.target.value;
setSlider();
setImageStyles();
};

const setFilters = () => {
createSlider(EFFECTS[EFFECT_DEFAULT].config);
effectListElement.addEventListener('change', startFilterHandler);
effectListElement.addEventListener('change', onEffectChange);
};

const removeFilters = () => {
effectItemElements[0].children[0].checked = true;
effectListElement.removeEventListener('change', startFilterHandler);
effectListElement.removeEventListener('change', onEffectChange);
sliderElement.noUiSlider?.destroy();
};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint": "eslint js/"
},
"engines": {
"node": "^20",
"npm": "^10"
"node": "20",
"npm": "10"
}
}

0 comments on commit bafd062

Please sign in to comment.