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

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

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

furidasha
Copy link
Contributor

@furidasha furidasha commented Jan 15, 2025

@keksobot keksobot changed the title Добавляет изменение масштаба и наложение фильтров Помощь друга Jan 15, 2025

effect.addEventListener('change', () => {
effect.setAttribute('checked', '');
image.removeAttribute('class');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Класс не стоит полностью удалять, лучше удалять конкретные классы через classList.remove() или удалять конкретные свойства если они заданы инлайн через style.removeProperty()

scaleValue -= scaleStep;
}
scaleControlValueElement.setAttribute('value', `${scaleValue}%`);
image.setAttribute('style', `transform: scale(0.${scaleValue})`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

image.setAttribute -> image.style.setProperty()

@keksobot keksobot merged commit 087d420 into htmlacademy-javascript:master Jan 16, 2025
1 check failed
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