Skip to content

Commit

Permalink
Added notification that redo/undo is currently not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeger-j committed Jan 12, 2023
1 parent e9e363b commit a80cdb4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased] -
### Changed
- Order of buttons in ToolBar: Move setting and filter btn up
- Added notification that redo/undo is currently not supported
### Added
- imgActions poperty that will record all actions a user performs during the annotation process
### Removed
Expand Down
52 changes: 33 additions & 19 deletions frontend/lost/src/containers/Annotation/SIA/lost-sia/src/Canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -1016,28 +1016,42 @@ class Canvas extends Component{
}

undo(){
if (!this.hist.isEmpty()){
const cState = this.hist.undo()
console.log('hist', this.hist)
this.setCanvasState(
cState.entry.annotations,
cState.entry.imgLabelIds,
cState.entry.selectedAnnoId,
cState.entry.showSingleAnno)
}
this.handleNotification({
title: "Redo/ Undo not supported",
message: `Redo and Undo functions are currently not supported`,
type: notificationType.WARNING
})
return
//TODO: Make UNDO great again
// if (!this.hist.isEmpty()){
// const cState = this.hist.undo()
// console.log('hist', this.hist)
// this.setCanvasState(
// cState.entry.annotations,
// cState.entry.imgLabelIds,
// cState.entry.selectedAnnoId,
// cState.entry.showSingleAnno)
// }
}

redo(){
if (!this.hist.isEmpty()){
const cState = this.hist.redo()
console.log('hist', this.hist)
this.setCanvasState(
cState.entry.annotations,
cState.entry.imgLabelIds,
cState.entry.selectedAnnoId,
cState.entry.showSingleAnno
)
}
this.handleNotification({
title: "Redo/ Undo not supported",
message: `Redo and Undo functions are currently not supported`,
type: notificationType.WARNING
})
return
//TODO: Make REDO great again
// if (!this.hist.isEmpty()){
// const cState = this.hist.redo()
// console.log('hist', this.hist)
// this.setCanvasState(
// cState.entry.annotations,
// cState.entry.imgLabelIds,
// cState.entry.selectedAnnoId,
// cState.entry.showSingleAnno
// )
// }
}

deleteAnnotation(anno) {
Expand Down

0 comments on commit a80cdb4

Please sign in to comment.