Skip to content
Snippets Groups Projects

feat(vector-map): implement reaction square element

Merged Miłosz Grocholewski requested to merge feat/MIN-56-reaction-square into development
Files
4
@@ -50,6 +50,10 @@ export const useOlMapReactionsLayer = ({
const reactions = useMemo(() => {
return modelReactions.map(reaction => {
const shape = shapes.find(bioShape => bioShape.sboTerm === reaction.sboTerm);
if (!shape) {
return [];
}
const reactionObject = new Reaction({
line: reaction.line,
products: reaction.products,
@@ -57,11 +61,12 @@ export const useOlMapReactionsLayer = ({
zIndex: reaction.z,
lineTypes,
arrowTypes,
shapes: shape.shapes,
pointToProjection,
});
return reactionObject.features;
});
}, [arrowTypes, lineTypes, modelReactions, pointToProjection]);
}, [arrowTypes, lineTypes, modelReactions, pointToProjection, shapes]);
const elements: Array<
MapElement | CompartmentCircle | CompartmentSquare | CompartmentPathway | Glyph
Loading