markers - add locked to already occupied

This commit is contained in:
Azgaar 2021-10-07 13:00:29 +03:00
parent 7f33c26729
commit 648c0ac0c9

View file

@ -46,9 +46,11 @@ window.Markers = (function () {
};
const regenerate = () => {
pack.markers = pack.markers.filter(({i, lock}) => {
if (lock) return true;
pack.markers = pack.markers.filter(({i, lock, cell}) => {
if (lock) {
occupied[cell] = true;
return true;
}
const id = `marker${i}`;
document.getElementById(id)?.remove();
const index = notes.findIndex(note => note.id === id);