Skip to content

Commit 3db0cd9

Browse files
committed
enable comments in annotation regions
1 parent 31a0e09 commit 3db0cd9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

client/src/Annotator/reducers/general-reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ export default (state, action) => {
824824
case "CLOSE_REGION_EDITOR": {
825825
const regionIndex = getRegionIndex(action.region)
826826
if (regionIndex === null) return state
827-
if (action.region?.name == null || action.region?.name == "") {
827+
if ((action.region?.name == null || action.region?.name == "") && action.region?.cls == null) {
828828
return setIn(state, [...pathToActiveImage, "regions", regionIndex], {
829829
...(activeImage.regions || [])[regionIndex],
830830
falseInput: true,

client/src/DemoSite/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default () => {
139139
enabledTools={getEnabledTools(settings.configuration.regionTypesAllowed) || []}
140140
regionClsList={settings.configuration.labels.map(label => label.id) || []}
141141
selectedImage={selectedImageIndex}
142-
enabledRegionProps= {["name", "class"]}
142+
enabledRegionProps= {["class", "comment"]}
143143
userReducer= {userReducer}
144144
onExit={(output) => {
145145
preprocessDataBeforeSend(output)

0 commit comments

Comments
 (0)