Skip to content
Snippets Groups Projects
Commit 4a2e93e2 authored by dsehnal's avatar dsehnal
Browse files

fix applyMarkerAction edge case

parent 55de0aba
Branches
Tags
No related merge requests found
...@@ -105,8 +105,13 @@ export function applyMarkerAction(array: Uint8Array, set: OrderedSet, action: Ma ...@@ -105,8 +105,13 @@ export function applyMarkerAction(array: Uint8Array, set: OrderedSet, action: Ma
applyMarkerActionAtPosition(array, i, action); applyMarkerActionAtPosition(array, i, action);
} }
for (let i = backStart; i < backEnd; ++i) { // to prevent applying "toggle" twice check for edge case where
applyMarkerActionAtPosition(array, i, action); // viewEnd <= viewStart, which resolves to the "front" and "back"
// intervals being the same range
if (frontStart !== backStart) {
for (let i = backStart; i < backEnd; ++i) {
applyMarkerActionAtPosition(array, i, action);
}
} }
} else { } else {
switch (action) { switch (action) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment