-
Notifications
You must be signed in to change notification settings - Fork 1
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
Надо подкачаться #14
Надо подкачаться #14
Conversation
♻️ Я собрал ваш пулреквест. Посмотреть можно здесь. |
♻️ Я собрал ваш пулреквест. Посмотреть можно здесь. |
♻️ Я собрал ваш пулреквест. Посмотреть можно здесь. |
js/form.js
Outdated
const imgUploadElement = formElement.querySelector('.img-upload__input'); | ||
const imgEditElement = formElement.querySelector('.img-upload__overlay'); | ||
const imgEditCloseButtonElement = formElement.querySelector('.img-upload__cancel'); | ||
const body = document.body; |
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.
Или удали и используй document.body
или переименуй в bodyELement
imgUploadElement.value = ''; | ||
stopValidator(); | ||
resetSettings(); | ||
} | ||
|
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.
У формы должно быть собственное api для сброса параметров
Скорее всего вот это https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reset, я точно не помню
js/form.js
Outdated
newHashTagsElement.value = ''; | ||
} | ||
|
||
function blockSubmitButton() { |
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/form.js
Outdated
function blockSubmitButton() { | ||
submitButtonElement.disabled = true; | ||
} | ||
|
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/form.js
Outdated
} | ||
|
||
function blockSubmitButton() { | ||
submitButtonElement.disabled = true; |
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.
Атрибуты здесь и далее нужно менять через setAttribute
, а не напрямую
js/image-editor.js
Outdated
@@ -70,7 +69,7 @@ const formatScale = (value) => `${value * 100}%`; | |||
|
|||
const changeScale = (value) => { | |||
scaleValue = value; | |||
ImageElement.style.transform = `scale(${scaleValue})`; | |||
imageElement.style.transform = `scale(${scaleValue})`; |
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.
Здесь и далее стилевые атрибуты нужно менять через style.setProperty
♻️ Я собрал ваш пулреквест. Посмотреть можно здесь. |
🎓 Надо подкачаться
💥 https://htmlacademy-javascript.github.io/254709-kekstagram-2/14/