mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
Fix missing box allocations on 3.38
This commit is contained in:
6
panel.js
6
panel.js
@@ -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;
|
||||
|
||||
4
utils.js
4
utils.js
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user