play-co / timestep

GNU General Public License v3.0
16 stars 27 forks source link

ListView renderMargin not working #12

Closed roosmaa closed 11 years ago

roosmaa commented 11 years ago

In the docs it can be read that renderMargin should be useful for adding margins. However, it didn't seem to work. Further investigation into code revealed that squill and timestep seem to have "grown apart".

First problem, in timestep:ListView, listOpts.renderMargin should probably be listOpts.margin (maybe other keys are out of sync as well?):

        var listOpts = {
            view: this,
            getCell: opts.getCell,
            sorter: opts.sorter,
            selectable: opts.selectable,
            selections: opts.selections,
            maxSelections: opts.maxSelections,
            dataSource: opts.dataSource,
            renderMargin: opts.renderMargin
        };

Second, the squill:List doesn't seem to handle/override updateOpts() call, so the only place where the margin is actually set is the List constructor. If timestep:ListView isn't supposed to call List.updateOpts, then the margin property should be set in the ListView constructor instead.

bubbleboy14 commented 11 years ago

Great catch, Mart! Thanks for pointing this out. This issue is fixed upstream, so you can expect renderMargin to work properly in the next release. Thanks again!