|
|
@ -166,9 +166,7 @@ export class AnalyticController { |
|
|
|
|
|
|
|
|
|
|
|
this.labelingUnit.saving = false; |
|
|
|
this.labelingUnit.saving = false; |
|
|
|
|
|
|
|
|
|
|
|
let unit = this.labelingUnit; |
|
|
|
|
|
|
|
this.dropLabeling(); |
|
|
|
this.dropLabeling(); |
|
|
|
this._runStatusWaiter(unit); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
undoLabeling() { |
|
|
|
undoLabeling() { |
|
|
@ -185,6 +183,8 @@ export class AnalyticController { |
|
|
|
this._labelingDataAddedSegments.clear(); |
|
|
|
this._labelingDataAddedSegments.clear(); |
|
|
|
this._labelingDataRemovedSegments.clear(); |
|
|
|
this._labelingDataRemovedSegments.clear(); |
|
|
|
this.labelingUnit.selected = false; |
|
|
|
this.labelingUnit.selected = false; |
|
|
|
|
|
|
|
// TODO: it could be changed before labeling
|
|
|
|
|
|
|
|
this.labelingUnit.changed = false; |
|
|
|
this._selectedAnalyticUnitId = null; |
|
|
|
this._selectedAnalyticUnitId = null; |
|
|
|
this._tempIdCounted = -1; |
|
|
|
this._tempIdCounted = -1; |
|
|
|
} |
|
|
|
} |
|
|
@ -206,6 +206,7 @@ export class AnalyticController { |
|
|
|
|
|
|
|
|
|
|
|
addSegment(segment: Segment, deleted = false) { |
|
|
|
addSegment(segment: Segment, deleted = false) { |
|
|
|
const addedSegment = this.labelingUnit.addSegment(segment, deleted); |
|
|
|
const addedSegment = this.labelingUnit.addSegment(segment, deleted); |
|
|
|
|
|
|
|
this.labelingUnit.changed = true; |
|
|
|
this._labelingDataAddedSegments.addSegment(addedSegment); |
|
|
|
this._labelingDataAddedSegments.addSegment(addedSegment); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -311,9 +312,6 @@ export class AnalyticController { |
|
|
|
const newIds = await this._analyticService.updateSegments( |
|
|
|
const newIds = await this._analyticService.updateSegments( |
|
|
|
unit.id, this._labelingDataAddedSegments, this._labelingDataRemovedSegments |
|
|
|
unit.id, this._labelingDataAddedSegments, this._labelingDataRemovedSegments |
|
|
|
); |
|
|
|
); |
|
|
|
if(unit.labelingMode !== LabelingMode.UNLABELING) { |
|
|
|
|
|
|
|
await this._analyticService.runDetect(unit.id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return newIds; |
|
|
|
return newIds; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -454,7 +452,14 @@ export class AnalyticController { |
|
|
|
this._labelingDataRemovedSegments.addSegment(s); |
|
|
|
this._labelingDataRemovedSegments.addSegment(s); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this._labelingDataAddedSegments.removeInRange(from, to); |
|
|
|
const removed = this._labelingDataAddedSegments.removeInRange(from, to); |
|
|
|
|
|
|
|
if(!_.isEmpty(removed)) { |
|
|
|
|
|
|
|
this.labelingUnit.changed = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this._labelingDataAddedSegments.length === 0 && |
|
|
|
|
|
|
|
this._labelingDataRemovedSegments.length === 0) { |
|
|
|
|
|
|
|
this.labelingUnit.changed = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
toggleLabelingMode(labelingMode: LabelingMode): void { |
|
|
|
toggleLabelingMode(labelingMode: LabelingMode): void { |
|
|
|