fixed apply-runes checkbox persisting too long

This commit is contained in:
tmont 2021-02-22 20:26:41 -08:00
parent c8ce1e6cd1
commit b6c901e561

View File

@ -318,9 +318,9 @@
const $enemyInfoModal = $('#enemy-info-modal');
if ($enemyInfoModal.length) {
let rowData;
let shouldApplyRunes = false;
$enemyInfoModal.find('.apply-runes-form input[type="checkbox"]').on('change', (e) => {
shouldApplyRunes = e.target.checked;
const shouldApplyRunes = e.target.checked;
if (rowData) {
if (shouldApplyRunes) {
@ -551,6 +551,10 @@
$enemyInfoModal.find('.vacuum-rate').text(toPer(vacuumRate));
};
$enemyInfoModal.on('hide.bs.modal', () => {
$enemyInfoModal.find('.apply-runes-form').hide().find('input').prop('checked', false);
});
$table.find('tbody.data td').on('click', (e) => {
rowData = rowData = { ...$(e.target).closest('tr').data() };