Skip to content

3.8.0

Compare
Choose a tag to compare
@jjti jjti released this 06 May 19:35
· 104 commits to develop since this release

What's Changed

Custom Rendering
This makes use of the children and refs props to allow custom rendering of the sequence viewers. For example, to render the linear viewer above the circular viewer:

import { useRef } from "react";
import { SeqViz, Linear, Circular } from "seqviz";

export default () => {
  const linearRef = useRef();
  const circularRef = useRef();

  return (
    <SeqViz
      name="J23100"
      seq="TTGACGGCTAGCTCAGTCCTAGGTACAGTGCTAGC"
      refs={{circular: circularRef, linear: linearRef}}
    >
      {({ circularProps, linearProps, ...props }) => (
        <div
          style={{ display: "flex", flexDirection: "column", width: "100%" }}
        >
          <div ref={linearRef} style={{ height: "25%", width: "100%" }}>
            <Linear {...linearProps} {...props} />
          </div>
          <div ref={circularRef} style={{ height: "75%", width: "100%" }}>
            <Circular {...circularProps} {...props} />
          </div>
        </div>
      )}
    </SeqViz>
  );
};

New Contributors

Full Changelog: 3.7.13...3.8.0