| | |
| | | form.resetFields(); |
| | | if (curSprite) { |
| | | form.setFieldsValue({ |
| | | |
| | | no: curSprite.data?.no, |
| | | // shelf |
| | | row: curSprite?.data?.row, |
| | | bay: curSprite?.data?.bay, |
| | | no: curSprite?.data?.no, |
| | | row: curSprite.data?.row, |
| | | bay: curSprite.data?.bay, |
| | | // point |
| | | vertical: curSprite.data?.vertical, |
| | | horizontal: curSprite.data?.horizontal, |
| | | }) |
| | | } |
| | | }, [props, form]); |
| | |
| | | sprite.data.uuid = item.uuid; |
| | | sprite.data.no = item.no; |
| | | |
| | | // dynamical data |
| | | Object.assign(sprite.data, item.property); |
| | | |
| | | // graph |
| | | sprite.position.set(item.positionX, item.positionY); |
| | | sprite.scale.set(item.scaleX, item.scaleY); |
| | |
| | | let mapItemList = []; |
| | | mapContainer?.children.forEach(child => { |
| | | if (child.data?.uuid) { |
| | | const { type, uuid, no, ...property } = child.data; |
| | | mapItemList.push({ |
| | | // data |
| | | type: child.data.type, |
| | | uuid: child.data.uuid, |
| | | no: child.data.no, |
| | | type: type, |
| | | uuid: uuid, |
| | | no: no, |
| | | property: property, |
| | | |
| | | // graph |
| | | positionX: child.position.x, |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 3/15/2024 |
| | | */ |
| | | @Data |
| | | public class MapItem { |
| | | |
| | | // data ------------------------------------------ |
| | | |
| | | private String type; |
| | | |
| | |
| | | |
| | | private String no; |
| | | |
| | | // dynamical data |
| | | private Map<String, Object> property; |
| | | |
| | | // graph ----------------------------------------- |
| | | |
| | | private Double positionX; |
| | | |