|
@ -287,6 +287,14 @@ ItemSet.prototype.repaint = function repaint() { |
|
|
resized = false, |
|
|
resized = false, |
|
|
frame = this.frame; |
|
|
frame = this.frame; |
|
|
|
|
|
|
|
|
|
|
|
// TODO: document this feature to specify one margin for both item and axis distance
|
|
|
|
|
|
if (typeof margin === 'number') { |
|
|
|
|
|
margin = { |
|
|
|
|
|
item: margin, |
|
|
|
|
|
axis: margin |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// update className
|
|
|
// update className
|
|
|
frame.className = 'itemset' + (options.className ? (' ' + asString(options.className)) : ''); |
|
|
frame.className = 'itemset' + (options.className ? (' ' + asString(options.className)) : ''); |
|
|
|
|
|
|
|
@ -297,12 +305,14 @@ ItemSet.prototype.repaint = function repaint() { |
|
|
this.lastWidth = this.width; |
|
|
this.lastWidth = this.width; |
|
|
|
|
|
|
|
|
// repaint all groups
|
|
|
// repaint all groups
|
|
|
var restack = zoomed || this.stackDirty; |
|
|
|
|
|
var height = 0; |
|
|
|
|
|
|
|
|
var restack = zoomed || this.stackDirty, |
|
|
|
|
|
height = 0, |
|
|
|
|
|
minHeight = margin.axis + margin.item; |
|
|
util.forEach(this.groups, function (group) { |
|
|
util.forEach(this.groups, function (group) { |
|
|
resized = group.repaint(range, margin, restack) || resized; |
|
|
resized = group.repaint(range, margin, restack) || resized; |
|
|
height += group.height; |
|
|
height += group.height; |
|
|
}); |
|
|
}); |
|
|
|
|
|
height = Math.max(height, minHeight); |
|
|
this.stackDirty = false; |
|
|
this.stackDirty = false; |
|
|
|
|
|
|
|
|
// reorder the groups (if needed)
|
|
|
// reorder the groups (if needed)
|
|
|