Fix missing box allocations on 3.38

This commit is contained in:
Charles Gagnon
2020-08-27 21:10:15 -04:00
parent 094e70325b
commit eff0b19203
2 changed files with 4 additions and 6 deletions

View File

@@ -963,16 +963,14 @@ var dtpPanel = Utils.defineClass({
currentPosition = group.tlOffset + startPosition;
group.elements.forEach(element => {
let extraParams = [];
element.box[this.varCoord.c1] = Math.round(currentPosition);
element.box[this.varCoord.c2] = Math.round((currentPosition += element.natSize));
if (element.isBox) {
extraParams.push(1);
return element.actor.allocate(element.box, flags, true);
}
Utils.allocate(element.actor, element.box, flags, false, extraParams);
Utils.allocate(element.actor, element.box, flags, false);
});
group[this.varCoord.c1] = startPosition;

View File

@@ -370,10 +370,10 @@ var getTransformedAllocation = function(actor) {
return { x1: topLeft.x, x2: bottomRight.x, y1: topLeft.y, y2: bottomRight.y };
};
var allocate = function(actor, box, flags, useParent, extraParams) {
var allocate = function(actor, box, flags, useParent) {
let allocateObj = useParent ? actor.__proto__ : actor;
allocateObj.allocate.apply(actor, getAllocationParams(box, flags).concat(extraParams || []));
allocateObj.allocate.apply(actor, getAllocationParams(box, flags));
};
var setAllocation = function(actor, box, flags) {