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

Merge branch 'feat/MIN-79-left-mouse-click-element-one-modification' into 'development'

refactor(vector-map): rendering modifications after element rendering

Closes MIN-79

See merge request !310
parents 983e1065 57c85fbb
No related branches found
No related tags found
1 merge request!310refactor(vector-map): rendering modifications after element rendering
Pipeline #98240 failed
......@@ -156,18 +156,6 @@ export default class MapElement extends BaseMultiPolygon {
}
protected createPolygons(): void {
this.modifications.forEach(modification => {
if (modification.state === null) {
return;
}
const shapes = this.bioShapes[modification.sboTerm];
if (!shapes) {
return;
}
this.drawModification(modification, shapes);
});
if (this.lineType) {
this.lineDash = this.lineTypes[this.lineType] || [];
}
......@@ -181,6 +169,18 @@ export default class MapElement extends BaseMultiPolygon {
this.drawElementPolygon(homodimerShift, homodimerOffset);
}
this.drawOverlays();
this.modifications.forEach(modification => {
if (modification.state === null) {
return;
}
const shapes = this.bioShapes[modification.sboTerm];
if (!shapes) {
return;
}
this.drawModification(modification, shapes);
});
}
drawModification(modification: Modification, shapes: Array<Shape>): void {
......
......@@ -141,18 +141,18 @@ export const setMultipleBioEntityContentsReducer = (
state: BioEntityContentsState,
action: PayloadAction<Array<BioEntity>>,
): void => {
state.data = [
{
data: action.payload.map(bioEntity => {
return {
state.data = action.payload.map(bioEntity => {
return {
data: [
{
bioEntity,
perfect: true,
};
}),
},
],
searchQueryElement: bioEntity.id.toString(),
loading: 'succeeded',
error: DEFAULT_ERROR,
searchQueryElement: 'asd',
},
];
};
});
state.loading = 'succeeded';
};
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