Wykres commitów

7 Commity (efbc44a94035cbf1112c7bd0819e2f76ce7fa5bb)

Autor SHA1 Wiadomość Data
Atul Varma cb55b12243 Maintain inversion of nested symbols. Fixes #39. 2021-03-07 19:40:30 -05:00
Atul Varma ecf98deedb Add support for invert_nested (#17). 2021-03-05 19:38:25 -05:00
Atul Varma 80d8f5f72a
Massively refactor and simplify creature-symbol.tsx. (#37)
This refactors `creature-symbol.tsx` so that it doesn't have to rely on awkwardly introspecting `JSX.Element` instances to do its job.  Now all of that mumbo-jumbo, which is only really useful for when we want to manually construct symbols like the eye creature, is encapsulated in `creature-symbol-factory.tsx`.
2021-02-27 18:55:14 -05:00
Atul Varma 6aba6b665f
Add mouseover tooltips with debugging information (#35)
This adds a bit of debugging information on mouseover.

For example, a tooltip with the text `bird@tail.arm[0]` can be interpreted as "a bird symbol attached to the tail symbol's first arm attachment point."

The implementation is a bit funky: we basically annotate the SVG DOM with various `data` attributes, and on mouseover we traverse the DOM from the element the mouse is over all the way up to the SVG root element, picking out relevant `data` attributes and building a tooltip out of it.  This ended up being easier than e.g. passing a bunch of props down the whole tree in React.
2021-02-27 13:28:44 -05:00
Atul Varma 5a5030ceb6 Make creature error messages easier to read. 2021-02-27 09:00:18 -05:00
Atul Varma 87affa0a4c Move constant to top of file. 2021-02-27 08:51:42 -05:00
Atul Varma 4098a23482 Factor out creature-symbol.tsx. 2021-02-27 08:50:06 -05:00