| | |
| | | |
| | | private static final String FREE_EDITOR_MODE = "free-v1"; |
| | | private static final Set<String> RUNTIME_TYPES = new HashSet<>(Arrays.asList( |
| | | "shelf", "crn", "dualCrn", "devp", "rgv" |
| | | "shelf", "crn", "dualCrn", "devp", "rgv", "annulus" |
| | | )); |
| | | private static final int DEFAULT_ROW_HEIGHT = 200; |
| | | private static final int DEFAULT_COL_WIDTH = 1000; |
| | |
| | | element.setWidth(width); |
| | | element.setHeight(height); |
| | | element.setValue(stringifyValue(source == null ? null : source.getValue())); |
| | | // 添加环穿轨道等信息 |
| | | if (source != null && !Cools.isEmpty(source.getShape())) { |
| | | element.setShape(String.valueOf(source.getShape()).trim()); |
| | | } |
| | | if (source != null && source.getPathList() != null && !source.getPathList().isEmpty()) { |
| | | List<Map<String, Object>> copy = new ArrayList<>(); |
| | | for (Map<String, Object> seg : source.getPathList()) { |
| | | if (seg == null || seg.isEmpty()) { |
| | | continue; |
| | | } |
| | | copy.add(new LinkedHashMap<>(seg)); |
| | | } |
| | | element.setPathList(copy); |
| | | } |
| | | if (source != null && source.getTurningPoint() != null && !source.getTurningPoint().isEmpty()) { |
| | | element.setTurningPoint(new LinkedHashMap<>(source.getTurningPoint())); |
| | | } |
| | | if (source != null && source.getAnnulusBandInset() != null) { |
| | | element.setAnnulusBandInset(source.getAnnulusBandInset()); |
| | | } |
| | | if ("devp".equals(element.getType())) { |
| | | validateDevpValue(element.getValue(), index); |
| | | } |