stevenpetryk / mafs

React components for interactive math

Home Page:https://mafs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vector markers are unnecessarily duplicated

stevenpetryk opened this issue · comments

Every vector defines its own marker with a unique ID, but all vectors have the exact same marker. This definition could be hoisted up to the main view to cut down on the number of elements that need to be rendered.

https://github.com/stevenpetryk/mafs/blob/main/src/display/Vector.tsx#L34-L46

Of course, it gets a little complicated when we start using colors... might need to experiment and see if the line's marker can inherit its color. Maybe it already does. idk.

Not really an issue tbh