(data: EditorData)
| 131 | // ================================================================================================================= |
| 132 | |
| 133 | public render(data: EditorData) { |
| 134 | const activeLabelId: string = LabelsSelector.getActiveLabelId(); |
| 135 | const imageData: ImageData = LabelsSelector.getActiveImageData(); |
| 136 | if (imageData) { |
| 137 | imageData.labelRects.forEach((labelRect: LabelRect) => { |
| 138 | if (labelRect.isVisible) { |
| 139 | if (labelRect.status === LabelStatus.ACCEPTED && labelRect.id === activeLabelId) { |
| 140 | this.drawActiveRect(labelRect, data) |
| 141 | } else { |
| 142 | this.drawInactiveRect(labelRect, data); |
| 143 | } |
| 144 | } |
| 145 | }); |
| 146 | this.drawCurrentlyCreatedRect(data.mousePositionOnViewPortContent, data.viewPortContentImageRect); |
| 147 | this.updateCursorStyle(data); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | private drawCurrentlyCreatedRect(mousePosition: IPoint, imageRect: IRect) { |
| 152 | if (!!this.startCreateRectPoint) { |
nothing calls this directly
no test coverage detected