Skip to content
Snippets Groups Projects
Commit 20f3c4ef authored by Miłosz Grocholewski's avatar Miłosz Grocholewski
Browse files

feat(vector-map): add shape option for modelElementSchema

parent ad4c9c00
No related branches found
No related tags found
4 merge requests!271Resolve MIN-39 "Feat/ glyphs",!265feat(vector-map): add drawer to control individual layers + add support for text layer,!261feat(vector-map): add support for homomultimer option,!260feat(vector-map): add drawing compartments
Pipeline #96305 passed
......@@ -62,6 +62,7 @@ export const useOlMapReactionsLayer = ({
nameVerticalAlign: element.nameVerticalAlign as VerticalAlign,
nameHorizontalAlign: element.nameHorizontalAlign as HorizontalAlign,
text: element.name,
fontSize: element.fontSize,
pointToProjection,
mapInstance,
modifications: element.modificationResidues,
......@@ -89,12 +90,13 @@ export const useOlMapReactionsLayer = ({
nameVerticalAlign: element.nameVerticalAlign as VerticalAlign,
nameHorizontalAlign: element.nameHorizontalAlign as HorizontalAlign,
text: element.name,
fontSize: element.fontSize,
pointToProjection,
mapInstance,
};
if (element.compartmentType === 'CIRCLE') {
if (element.shape === 'OVAL_COMPARTMENT') {
validElements.push(new CompartmentCircle(compartmentProps));
} else {
} else if (element.shape === 'SQUARE_COMPARTMENT') {
validElements.push(new CompartmentSquare(compartmentProps));
}
}
......
......@@ -40,7 +40,7 @@ export const modelElementSchema = z.object({
innerWidth: z.number().optional(),
outerWidth: z.number().optional(),
thickness: z.number().optional(),
compartmentType: z.enum(['SQUARE', 'CIRCLE']).optional(),
shape: z.enum(['SQUARE_COMPARTMENT', 'OVAL_COMPARTMENT', 'PATHWAY']).optional(),
complex: z.number().nullable().optional(),
initialAmount: z.number().nullable().optional(),
charge: z.number().nullable().optional(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment