Skip to content

Commit

Permalink
Round by 0.25 for the enhanced robogrades
Browse files Browse the repository at this point in the history
  • Loading branch information
sarikaya committed Jul 17, 2024
1 parent 3009b79 commit b94e16c
Showing 1 changed file with 48 additions and 8 deletions.
56 changes: 48 additions & 8 deletions cvat-ui/src/components/annotation-page/grades-form/grades-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,22 +447,42 @@ export function GradesForm({ task }: Props): JSX.Element | null {
<Row gutter={[8, 16]}>
<Col span={6}>
<Form.Item label='Centering' name='front_centering_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Surface' name='front_surface_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Edges' name='front_edges_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Corners' name='front_corners_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
</Row>
Expand All @@ -473,22 +493,42 @@ export function GradesForm({ task }: Props): JSX.Element | null {
<Row gutter={[8, 16]}>
<Col span={6}>
<Form.Item label='Centering' name='back_centering_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Surface' name='back_surface_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Edges' name='back_edges_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Corners' name='back_corners_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
</Row>
Expand Down

0 comments on commit b94e16c

Please sign in to comment.