|
@ -1,5 +1,6 @@ |
|
|
var Hammer = require('../../../module/hammer'); |
|
|
var Hammer = require('../../../module/hammer'); |
|
|
var Item = require('./Item'); |
|
|
var Item = require('./Item'); |
|
|
|
|
|
var BackgroundGroup = require('../BackgroundGroup'); |
|
|
var RangeItem = require('./RangeItem'); |
|
|
var RangeItem = require('./RangeItem'); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -185,18 +186,18 @@ BackgroundItem.prototype.repositionY = function(margin) { |
|
|
// and in the case of no subgroups:
|
|
|
// and in the case of no subgroups:
|
|
|
else { |
|
|
else { |
|
|
// we want backgrounds with groups to only show in groups.
|
|
|
// we want backgrounds with groups to only show in groups.
|
|
|
if (this.data.group !== undefined) { |
|
|
|
|
|
height = this.parent.height; |
|
|
|
|
|
// same alignment for items when orientation is top or bottom
|
|
|
|
|
|
this.dom.box.style.top = this.parent.top + 'px'; |
|
|
|
|
|
this.dom.box.style.bottom = ''; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
|
|
|
if (this.parent instanceof BackgroundGroup) { |
|
|
// if the item is not in a group:
|
|
|
// if the item is not in a group:
|
|
|
height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.centerContainer.height); |
|
|
height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.centerContainer.height); |
|
|
this.dom.box.style.top = onTop ? '0' : ''; |
|
|
this.dom.box.style.top = onTop ? '0' : ''; |
|
|
this.dom.box.style.bottom = onTop ? '' : '0'; |
|
|
this.dom.box.style.bottom = onTop ? '' : '0'; |
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
height = this.parent.height; |
|
|
|
|
|
// same alignment for items when orientation is top or bottom
|
|
|
|
|
|
this.dom.box.style.top = this.parent.top + 'px'; |
|
|
|
|
|
this.dom.box.style.bottom = ''; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
this.dom.box.style.height = height + 'px'; |
|
|
this.dom.box.style.height = height + 'px'; |
|
|
}; |
|
|
}; |
|
|