Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
fix: LEAP-368: Don't add hidden and locked to undo history (#1641)
Browse files Browse the repository at this point in the history
* fix: LEAP-368: Don't add visibility to undo history

Very simple fix. But there is a new UX problem them:
if you undo/redo actions done to hidden regions you see no changes
on the screen, previously region became visible at some point
and them undo to actual actions.

* Also do the same with `locked` property

---------

Co-authored-by: hlomzik <hlomzik@users.noreply.github.com>
  • Loading branch information
hlomzik and hlomzik authored Dec 21, 2023
1 parent 3c7243d commit 88ba15c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mixins/Regions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const RegionsMixin = types

score: types.maybeNull(types.number),

hidden: types.optional(types.boolean, false),

filtered: types.optional(types.boolean, false),

parentID: types.optional(types.string, ''),
Expand All @@ -23,8 +21,6 @@ const RegionsMixin = types
// Dynamic preannotations enabled
dynamic: false,

locked: false,

origin: types.optional(types.enumeration([
'prediction',
'prediction-changed',
Expand All @@ -36,6 +32,8 @@ const RegionsMixin = types
.volatile(() => ({
// selected: false,
_highlighted: false,
hidden: false,
locked: false,
isDrawing: false,
perRegionFocusRequest: null,
shapeRef: null,
Expand Down

0 comments on commit 88ba15c

Please sign in to comment.