moleculemaker / chemscraper-frontend

MIT License
1 stars 0 forks source link

Resize and display SVGs generated by molconvert #32

Closed yashdeep97 closed 1 year ago

yashdeep97 commented 1 year ago

Problem:

  1. SVGs generated by RDKit do not match the figures in the PDF, we need to use output from molconvert instead.

Approach:

  1. Display molconvert SVGs returned by the results endpoint.
  2. To ensure the rendered SVG fits in the column, first remove the height and width attributes from SVG and add the viewBox attribute instead which makes the SVG maintain its aspect ratio while filling its parent div.

How to test:

  1. Changes deployed to staging
  2. Run a new chemscraper job and observe results table to match SVGs generated to the figures in the PDF.