codecombat / treema

jQuery plugin that generates HTML interfaces to edit JSON data defined by json-schema.
http://codecombat.github.io/treema/
MIT License
152 stars 36 forks source link

Add an option whether to show the root Treema node #48

Open nwinter opened 9 years ago

nwinter commented 9 years ago

Migrating from https://github.com/codecombat/codecombat/issues/1259:

Oh, it's because the root node is always hidden. It's assumed to be a collection (an array or object) and that's why we don't usually show treemas in the patches for anything but collections. Think of all the treemas throughout the site, all of them have top-level collection nodes which are kept out of sight but always open.

I would add an option to treema which would add a class to the root node that triggers a rule to override the &.treema-root > .treema-row .treema-value, &.treema-root > .treema-row .treema-type-select rule at the top of base.sass