| | |
| | | setLastCopiedSprites([]); |
| | | for (let i = 0; i < values.copyCount; i++) { |
| | | const copiedSprite = Utils.copySprite(curSprite); |
| | | // auto-increment-value |
| | | if (values.autoIncrement && values.type) { |
| | | switch (values.type) { |
| | | case Utils.SENSOR_TYPE.SHELF: |
| | | console.log(values); |
| | | break; |
| | | case Utils.SENSOR_TYPE.AGV: |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | // graph copy |
| | | switch (values.copyDire) { |
| | | case 'left': |
| | | copiedSprite.position.x -= (i + 1) * (values.copyGap + copiedSprite.width); |
| | |
| | | <Form |
| | | form={form} |
| | | onFieldsChange={formValuesChange} |
| | | initialValues={{ |
| | | }} |
| | | onFinish={handleFinish} |
| | | onFinishFailed={onFinishFailed} |
| | | autoComplete="off" |
| | |
| | | }} |
| | | wrapperCol={{ |
| | | span: 20, |
| | | }} |
| | | initialValues={{ |
| | | scale: 1, |
| | | rotation: 1 |
| | | }} |
| | | > |
| | | <Row gutter={[24, 16]}> |
| | |
| | | name="scale" |
| | | > |
| | | <InputNumber |
| | | changeOnWheel |
| | | min={0.1} max={10} defaultValue={1} step={0.1} |
| | | min={0.1} max={10} step={0.1} |
| | | rules={[ |
| | | { |
| | | required: true, |
| | |
| | | name="rotation" |
| | | > |
| | | <InputNumber |
| | | changeOnWheel |
| | | min={0} max={360} defaultValue={0} |
| | | min={0} max={360} |
| | | rules={[ |
| | | { |
| | | required: true, |
| | |
| | | </Form.Item> |
| | | <Form.Item> |
| | | <Button |
| | | type="dashed" |
| | | type="link" |
| | | onClick={() => { |
| | | if (lastCopiedSprites) { |
| | | lastCopiedSprites.forEach(copiedSprite => { |