33 lines
855 B
TypeScript
33 lines
855 B
TypeScript
import { graphicsRegistry } from "../registry";
|
|
import { ellipseGraphicDefinition } from "./ellipse";
|
|
import { polygonGraphicDefinition } from "./polygon";
|
|
import { rectangleGraphicDefinition } from "./rectangle";
|
|
import { starGraphicDefinition } from "./star";
|
|
|
|
const defaultGraphicDefinitions = [
|
|
rectangleGraphicDefinition,
|
|
ellipseGraphicDefinition,
|
|
polygonGraphicDefinition,
|
|
starGraphicDefinition,
|
|
];
|
|
|
|
export function registerDefaultGraphics(): void {
|
|
for (const definition of defaultGraphicDefinitions) {
|
|
if (graphicsRegistry.has(definition.id)) {
|
|
continue;
|
|
}
|
|
graphicsRegistry.register({
|
|
key: definition.id,
|
|
definition,
|
|
});
|
|
}
|
|
}
|
|
|
|
export {
|
|
ellipseGraphicDefinition,
|
|
polygonGraphicDefinition,
|
|
rectangleGraphicDefinition,
|
|
starGraphicDefinition,
|
|
};
|
|
export { STROKE_ALIGN_PARAM } from "./shared";
|