ericabouaf / wireit

A javascript wiring library to create web wirable interfaces for dataflow applications, visual programming languages or graphical modeling.
http://neyric.github.io/wireit/docs/
Other
520 stars 90 forks source link

using the module name in container class #29

Closed DerManoMann closed 14 years ago

DerManoMann commented 14 years ago

When modules are added to the editor layer the container gets a class added in the form of: "WiringEditor-module-"+module.name

This causes isses because: a) The name is also used for display purposes - some of the names I use contain whitespace, so the class name is not usable b) It would be great if the category could be used instead or in addition, for example: "WiringEditor-module-"+module.category This will allow to select individual modules if required (and the name doesn't include whitespace) or groups for custom styling

ericabouaf commented 14 years ago

We could either use a convention (replace spaces by '-' ?), or make it customizable in the language definition.

Which one do you prefer ? I personnaly like the convention because it's less verbose...

DerManoMann commented 14 years ago

Convention would be fine with me. Ta

ericabouaf commented 14 years ago

a) Replace spaces by '-' : http://github.com/neyric/wireit/commit/9c53502c38c83947694da7be5302fdcc583f2ffa#diff-9

b) I added a CSS class corresponding to the category (before the module class) : http://github.com/neyric/wireit/commit/dfc2e6214d1ca8f829e9efe48b3eaec45757617f#diff-7