Skip to content
This repository

Dynamically adjusting header to left doesnot work in BBUI #711

raakhtar opened this Issue February 19, 2013 · 8 comments

2 participants

Tim Neil

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';

Tim Neil

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

Tim Neil

In your code example, I don't see where you are calling

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

categoryContainer = document.createElement('div');

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

Tim Neil

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

Tim Neil

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.

Tim Neil tneil closed this March 10, 2013
Tim Neil
tneil commented March 10, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.