API / geotoolkit / schematics / factory / FlippedSvgNodeFactory / FlippedSvgNodeFactory
factory.FlippedSvgNodeFactory.FlippedSvgNodeFactory
Implements a Flipped Node Factory for nodes defined by svg files
↳
FlippedSvgNodeFactory
Methods
Constructors
• new FlippedSvgNodeFactory(parser, filePath, dataProvider?, isLeft?)
| Name | Type | Description |
|---|---|---|
parser | SVGParser | Instance of SVG Parser |
filePath | string | Relative path to the SVG file |
Optional dataProvider | SvgDataProvider | Instance of SvgDataProvider |
Optional isLeft | boolean | isLeft flag |
SvgNodeFactory.constructor
Methods
▸ createComponentNode(data): ReusableComponentNode
Creates a an svg component node and sends a request for the svg file. Once file loaded, parses it with SVG parser and invalidates the node
| Name | Type | Description |
|---|---|---|
data | Element | Data to create the component node |
SvgNodeFactory.createComponentNode
▸ getDataProvider(): SvgDataProvider
SvgNodeFactory.getDataProvider
▸ getParser(): SVGParser
▸ setDataProvider(dp): FlippedSvgNodeFactory
Sets the data provider
Throws
If passed Data Provider is not inherited from SvgDataProvider
| Name | Type | Description |
|---|---|---|
dp | SvgDataProvider | Data Provider instance |
SvgNodeFactory.setDataProvider
▸ setParser(p): FlippedSvgNodeFactory
Sets SVG Parser
Throws
If passed Parser is not inherited from SVGParser
| Name | Type | Description |
|---|---|---|
p | SVGParser | SVG Parser instance |
▸ validGeometryData(geometryData): boolean
Validates geometry data. The implementation returns "true" always
| Name | Type | Description |
|---|---|---|
geometryData | Entity | geometry data to validate |
boolean
SvgNodeFactory.validGeometryData
▸ Static getSVGNodeViewBox(node): Rect
If the component node is created by SvgNodeFactory then the method returns its inner_child_group's model limits. Those limits are essentially SVG's view box.
| Name | Type | Description |
|---|---|---|
node | ComponentNode | component node to evaluate |