/** * Created by TonyJiang on 16/8/24. */ import {LayoutSection, LayoutProperty, LayoutSectionKeyEnum} from "./LayoutSection"; import {Layout} from "./Layout"; import {CommonProperty, GraphProperty, RectangleProperty} from "../properties/define"; export class RectangleItemLayout extends Layout { constructor() { super(); this.sections.push(RectangleItemLayout.preference()); this.sections.push(RectangleItemLayout.layout()); } private static preference(): LayoutSection { const section = new LayoutSection(LayoutSection.LAYOUT_SECTION[LayoutSectionKeyEnum.PREFERENCE]); section.properties.push(new LayoutProperty(GraphProperty.stroke)); section.properties.push(new LayoutProperty(GraphProperty.fill)); // section.properties.push(new LayoutProperty(RectangleProperty.radius)); return section; } private static layout(): LayoutSection { const section = new LayoutSection(LayoutSection.LAYOUT_SECTION[LayoutSectionKeyEnum.LAYOUT]); section.properties.push( new LayoutProperty(CommonProperty.position), new LayoutProperty(CommonProperty.size) // new LayoutProperty(CommonProperty.x), // new LayoutProperty(CommonProperty.y), // new LayoutProperty(CommonProperty.width), // new LayoutProperty(CommonProperty.height) ); return section; } }