glejeune/node-graphviz

class attr is not implemented in attributs.js

Opened this issue · 1 comments

I try to change the class of the edges in the rendered SVG. So I pass the class property as attribute.

After that, the error TypeError: Cannot read property 'type' of undefined occurs in the mustBeQuoted function (graphviz\lib\deps\attributs.js:191:42)

Reason is that class attribute is not implemented in attributs.js (graphviz\lib\deps\attributs.js)

var attrs = {
  "Damping" :            { "usage" : "G",    "type" : "double" },
  "K" :                  { "usage" : "GC",   "type" : "double" },
  "URL" :                { "usage" : "ENGC", "type" : "escString" },
  "area" :               { "usage" : "NC",   "type" : "double" },
  "arrowhead" :          { "usage" : "E",    "type" : "arrowType" },
  "arrowsize" :          { "usage" : "E",    "type" : "double" },
  "arrowtail" :          { "usage" : "E",    "type" : "arrowType" },
  "aspect" :             { "usage" : "G",    "type" : "aspectType" },
  "bb" :                 { "usage" : "G",    "type" : "rect" },
  "bgcolor" :            { "usage" : "GC",   "type" : "color" },
  "center" :             { "usage" : "G",    "type" : "bool" },
  "charset" :            { "usage" : "G",    "type" : "string" },
  "clusterrank" :        { "usage" : "G",    "type" : "clusterMode" },
  "color" :              { "usage" : "ENC",  "type" : "color" },
  "colorscheme" :        { "usage" : "ENCG", "type" : "string" },
...

Is it possible to add class attribute as feature?

Please?