Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Dynamically adjusting header to left doesnot work in BBUI #711

raakhtar opened this Issue Feb 20, 2013 · 8 comments


None yet
2 participants

dynamic Text justification in image list does not work and always shows the content center aligned.

var categoryList = document.createElement('div');
categoryList.setAttribute('id', 'categoryLst');

var header = document.createElement('div');
header.setAttribute('id', 'head');
header.innerHTML = 'Categories';


tneil commented Feb 20, 2013

Where are you running this code? before or after the DOM is loaded?

the code is running after dom is loaded. As The List appears OK with the exception of title being center aligned instead of left-aligned


tneil commented Feb 20, 2013

In your code example, I don't see where you are calling bb.imageList.style()

Are you able to post the full code you are using?

categoryList= bb.imageList.style(categoryList);
categoryContainer = document.createElement('div');

I just added categoryList = bb.imageList.style(categoryList); gives error under debug mode TypeError: 'undefined' is not a function (evaluating 'bb.imageList.style(avatarContent)') and the list will not show up. This is all being done before loading of DOM.


tneil commented Feb 20, 2013

You don't want to do an apply and a style, only style. The apply function was never intended to be public.

if bb.imageList.apply([categoryList]); is not used the list does note show. Moreover, I have also tried the style only option as well with no results. I am usin 0.9.6 beta release of BBUI


tneil commented Feb 20, 2013

Ah ok.. so I was mistaken in thinking that the style function had been added to the image list as recorded in issue #445

There currently isn't a good way to create an image list on the fly and then add it into the DOM. You can however have an empty image list and then refresh its items as shown in the following sample.



tneil commented Mar 11, 2013

This should be made available with issue #445. I'm going to close this issue as a duplicate.

@tneil tneil closed this Mar 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment