Skip to content

Commit

Permalink
Merge pull request #48 from roboduels/develop
Browse files Browse the repository at this point in the history
Round by 0.25 for the enhanced robogrades
  • Loading branch information
sarikaya authored Jul 17, 2024
2 parents 24b36df + 995f125 commit 549bf6a
Showing 1 changed file with 49 additions and 9 deletions.
58 changes: 49 additions & 9 deletions cvat-ui/src/components/annotation-page/grades-form/grades-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -440,29 +440,49 @@ export function GradesForm({ task }: Props): JSX.Element | null {
{enhancedRobogradesVisibility ? (
<Col span={10}>
<Collapse defaultActiveKey={['1']}>
<Panel header='Enhanced Robogrades' key='1'>
<Panel header='Enhanced Robogrades' key='1' className='grades-form-robogrades'>
<Typography.Text strong className='grades-form-inner-title'>
Front of Card
</Typography.Text>
<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 549bf6a

Please sign in to comment.