/** * Created by TonyJiang on 16/8/24. */ import {LayoutSection, LayoutProperty, LayoutSectionKeyEnum} from "./LayoutSection"; import {Layout} from "./Layout"; import {CommonProperty, GraphProperty, LineShapeProperty} from "../properties/define"; export class LineShapeLayout extends Layout{ constructor() { super(); this.sections.push(LineShapeLayout.preference()); this.sections.push(LineShapeLayout.layout()); } private static preference():LayoutSection { const section = new LayoutSection(LayoutSection.LAYOUT_SECTION[LayoutSectionKeyEnum.PREFERENCE]); section.properties.push( new LayoutProperty(LineShapeProperty.lineDirection), new LayoutProperty(GraphProperty.stroke) ); 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; } }