Skip to content
Snippets Groups Projects

feat: add display reaction overlay (MIN-215)

Merged Adrian Orłów requested to merge MIN-215-display-overlays-for-reactions into development
All threads resolved!

Closes MIN-215

Objective:

Implement a handler for displaying multiple reactions defined in the overlay config

How it works (shorten):

  1. Algo tests if overlay element is bioentity/reaction by certain fields existence in element object
  2. If the overlay element is a reaction, all possible segments (base/reactants etc.) are combined into a polygons array
  3. Then, polygons are rendered as lines starting from left-top point and ending at right-bottom polygon point
  4. It's possible that Left-Top (X1Y1) point will be lower in space than Right-Bottom (X2Y2) point. That's why width/height are defined as an absolute value. However, it does not require additional edge-case coverage. In the case above, the line will be just mirror-reversed and that's an expected behavior

What has been done:

  • additional handlers for overlay element type of reaction
  • unit tests

image

Edited by Adrian Orłów

Merge request reports

Merge request pipeline #84885 passed

Merge request pipeline passed for fa7817a6

Test coverage 92.85% (0.08%) from 1 job
Approval is optional

Merged by Adrian OrłówAdrian Orłów 1 year ago (Jan 25, 2024 3:47pm UTC)

Merge details

  • Changes merged into development with 459df684.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #84886 passed

Pipeline passed for 459df684 on development

Test coverage 92.85% (0.08%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Tadeusz Miesiąc
  • LGTM

    It might be worth to update comments for future developers working with overlays to give them idea how it works. Check src/components/Map/MapViewer/utils/config/overlaysLayer/useOlMapOverlaysLayer.ts file.

  • Tadeusz Miesiąc approved this merge request

    approved this merge request

  • Adrian Orłów added 1 commit

    added 1 commit

    Compare with previous version

  • Adrian Orłów resolved all threads

    resolved all threads

  • Adrian Orłów added 18 commits

    added 18 commits

    Compare with previous version

  • Adrian Orłów added 1 commit

    added 1 commit

    Compare with previous version

  • Adrian Orłów added 12 commits

    added 12 commits

    Compare with previous version

  • Adrian Orłów enabled an automatic merge when the pipeline for fa7817a6 succeeds

    enabled an automatic merge when the pipeline for fa7817a6 succeeds

  • merged

  • Adrian Orłów mentioned in commit 459df684

    mentioned in commit 459df684

  • Please register or sign in to reply
    Loading