Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Помощь друга #12

Merged

Conversation

AttitudeOne1
Copy link
Contributor

@AttitudeOne1 AttitudeOne1 commented Feb 6, 2025

keksobot pushed a commit that referenced this pull request Feb 7, 2025
@keksobot
Copy link
Contributor

keksobot commented Feb 7, 2025

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

@@ -234,6 +234,7 @@ <h2 class="data-error__title">Не удалось загрузить данны
</section>
</template>
<script src="vendor/pristine/pristine.min.js"></script>
<script src="vendor/nouislider/nouislider.js"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужны еще стили

js/effects.js Outdated
Comment on lines 108 to 112
imagePreview.className = '';
imagePreview.style = '';
effectLevelValue.value = '';
effectLevel.classList.add('hidden');
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

переиспользовать код, вынося его в функции

js/effects.js Outdated
@@ -0,0 +1,159 @@
const EFFECTS_DATA = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это в camelCase

js/effects.js Outdated
const imagePreview = document.querySelector('.img-upload__preview img');
const effectsContainer = document.querySelector('.effects__list');

const INITIAL_EFFECT = EFFECTS_DATA.none;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INITIAL_EFFECT просто в camelCase или сразу строку с именем присваивать

const unit = EFFECTS_DATA[filterName].unit;
imagePreview.style.filter = '';

if (filterName !== INITIAL_EFFECT) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это сравнение строки с объектом

const onEffectsContainerChange = (evt) => {
const targetElement = evt.target.value;
useDefaultEffect();
if (targetElement !== INITIAL_EFFECT) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

объекты сравниваются по ссылке

start: 100,
step: 1,
format: {
to: (value) => Number.isInteger(value) ? value.toFixed(0) : value.toFixed(1),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to: (value) => Number(value),

@Kartaviy-arteom Kartaviy-arteom merged commit 8045e5e into htmlacademy-javascript:master Feb 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants