Skip to content

Commit

Permalink
Добавил удаление таймаута в коллбэке на сброс noticeForm
Browse files Browse the repository at this point in the history
  • Loading branch information
Janealter authored Mar 9, 2018
1 parent fc18ddd commit 6f92218
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@

noticeForm.addEventListener('reset', function () {
// Устанавливаем timeout, чтобы координаты установились после события reset, а не во время него
setTimeout(function () {
var timeoutID = setTimeout(function () {
// Устанавливаем координаты в поле Адрес
window.form.setAddressCoords(window.pinMain.parameters.getCursorX(), window.pinMain.parameters.getCursorY());
clearTimeout(timeoutID);
}, SAC_TIMEOUT_DELAY);
});
};
Expand Down

0 comments on commit 6f92218

Please sign in to comment.