Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example UsageArgumentsDefault ParamsReturn Value
gs.addGlyph(elem, glyphId, size, overlay, trans);

elem: d3 selection of the SVG element into which this glyph will go

glyphId: the name of the glyph you want to add

size: the size in pixels that the glyph will be (must be a number)

overlay: boolean of whether this glyph will overlay another glyph

trans: an array of (x,y) coordinates of translation

size: 40

overlay: false

trans: false

the d3 selection of the 'use' element just created for your glyph

...

The Glyphs

The ONOS GUI comes with several built in glyphs that you can use. Here are pictures and names of them all.

Image Removed

core glyphs pre-defined in the Glyph library can be viewed with the following utility web page:

https://github.com/opennetworkinglab/onos/blob/master/web/gui/src/main/webapp/_dev/show-glyphs.html

IntelliJ has a feature where hovering the mouse near the top-right corner of the editor pane of an .html file will invoke a context menu of possible browsers to launch the page into:

Image Added

So, loading show-glyphs.html into the editor and launching it, will open a page that loads and displays the glyphs in the library:

[ screen shot needed ] 

(Note: this page has been broken since the removal of third-party source from the ONOS source tree – fix pending)