Skip to content
Snippets Groups Projects
Commit 7088d94a authored by Adrian Orłów's avatar Adrian Orłów
Browse files

fix: rfc changes

parent 3b96db45
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!110feat: add display reaction overlay (MIN-215)
Pipeline #84879 passed
...@@ -59,8 +59,8 @@ export const getOverlayFeatures = ({ ...@@ -59,8 +59,8 @@ export const getOverlayFeatures = ({
return createOverlayLineFeature( return createOverlayLineFeature(
[ [
{ x: xMin, y: entity.y1 }, { x: entity.x1, y: entity.y1 },
{ x: xMax, y: entity.y2 }, { x: entity.x2, y: entity.y2 },
] as LinePoint, ] as LinePoint,
{ {
color, color,
......
...@@ -2,7 +2,7 @@ import { LINE_WIDTH } from '@/constants/canvas'; ...@@ -2,7 +2,7 @@ import { LINE_WIDTH } from '@/constants/canvas';
import { Fill, Stroke, Style } from 'ol/style'; import { Fill, Stroke, Style } from 'ol/style';
import { getOverlayLineFeatureStyle } from './getOverlayLineFeatureStyle'; import { getOverlayLineFeatureStyle } from './getOverlayLineFeatureStyle';
const COLORS = ['#000000', '#FFFFFF', '#F5F5F5', '#C0C0C0']; const COLORS = ['#000000', '#FFFFFF', '#F5F5F5', '#C0C0C0', '#C0C0C0aa', '#C0C0C0bb'];
describe('getOverlayLineFeatureStyle - util', () => { describe('getOverlayLineFeatureStyle - util', () => {
it.each(COLORS)('should return Style object', color => { it.each(COLORS)('should return Style object', color => {
......
...@@ -11,6 +11,13 @@ export const parseOverlayBioEntityToOlRenderingFormat = ( ...@@ -11,6 +11,13 @@ export const parseOverlayBioEntityToOlRenderingFormat = (
overlayId: number, overlayId: number,
): OverlayBioEntityRender[] => ): OverlayBioEntityRender[] =>
data.reduce((acc: OverlayBioEntityRender[], entity: OverlayBioEntity) => { data.reduce((acc: OverlayBioEntityRender[], entity: OverlayBioEntity) => {
/**
* The're two types of entities - bioentity and reaction
* Bioentity comes with the single only element
* And reaction comes with many different lines that needs to be merged together
* Every reaction line is a different entity after reduce
*/
if (isBioEntity(entity)) { if (isBioEntity(entity)) {
acc.push({ acc.push({
type: 'rectangle', type: 'rectangle',
......
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