Skip to content

feat: add display reaction overlay (MIN-215)

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