-
Notifications
You must be signed in to change notification settings - Fork 2
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
Помощь друга #12
Conversation
♻️ Я собрал ваш пулреквест. Посмотреть можно здесь. |
@@ -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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нужны еще стили
js/effects.js
Outdated
imagePreview.className = ''; | ||
imagePreview.style = ''; | ||
effectLevelValue.value = ''; | ||
effectLevel.classList.add('hidden'); | ||
}; |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to: (value) => Number(value),
8045e5e
into
htmlacademy-javascript:master
💥 https://htmlacademy-javascript.github.io/1582959-kekstagram-2/12/