sugarlabs / sugar-web

Components for Sugar web activities
Apache License 2.0
13 stars 32 forks source link

Palette: add header #58

Closed manuq closed 11 years ago

manuq commented 11 years ago

Palette will have a header if the user pass primaryText to the constructor. If the user sets content, there will be a separator between the header and the content.

API change: to set the content, use palette.setContent(content) . Previously was done using getContainer(), which does not exist anymore.

Also, improve the offset calculation using element.getBoundingClientRect https://developer.mozilla.org/en-US/docs/Web/API/element.getBoundingClientRect

manuq commented 11 years ago

The palette sample has been updated: http://sugarlabs.github.io/sugar-web-samples/palette.html