3.8.0
What's Changed
- add custom children support by @bugzpodder in #206
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>
);
};
- Bump yaml from 1.10.2 to by @dependabot in #204
New Contributors
- @bugzpodder made their first contribution in #206
Full Changelog: 3.7.13...3.8.0