Use <g> to simplify SVG and fix styling. Make functions clickable etc. #11

Merged
merged 2 commits into from Mar 19, 2013

Conversation

Projects
None yet
2 participants
Contributor

timbunce commented Mar 18, 2013

Place each rect and text pair into a g block.
Replace the duplicated rect and text onmouseover with a single g onmouseover.
This reduces the size of the SVG file. It also fixes the loss of the black border when mousing over the text.

An external file can be used to specify attributes for individual functions. So, for example, functions can now be given links.

(They can't be given specific colors via this mechanism, at least not currently, because the colour of the is overridden by the colour of the . YAGNI applies for now.)

timbunce added some commits Mar 18, 2013

@timbunce timbunce Use <g> to simplify SVG and fix styling. Add name attribute file mech…
…anism.

Place rect and text into a g block.
Replace the duplicated rect and text onmouseover with a single g onmouseover.
This reduces the size of the SVG file. It also fixes the loss of the
black border when mousing over the text.

An external file can be used to specify attributes for individual
functions. So, for example, functions can be given links and colors.
da9a4bb
@timbunce timbunce default target=_top else links will open within SVG <object> 912c724

@brendangregg brendangregg added a commit that referenced this pull request Mar 19, 2013

@brendangregg brendangregg Merge pull request #11 from timbunce/linking
Use <g> to simplify SVG and fix styling. Make functions clickable etc.
b7250da

@brendangregg brendangregg merged commit b7250da into brendangregg:master Mar 19, 2013

Owner

brendangregg commented Mar 19, 2013

excellent, thanks! building a linkable flame graph to functions in a source browser should be fun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment