Skip to content

Commit

Permalink
fix(typesetter): Don't loose original node dimensions during pagebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Jan 4, 2020
1 parent 7c908c9 commit 8c38979
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/nodefactory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -376,19 376,18 @@ nodefactory.vglue = pl.class({
type = "vglue",
discardable = true,
_default_length = "height",
adjustment = SILE.measurement(),

__tostring = function (self)
return (self.explicit and "E:" or "") .. "VG<" .. self.height .. ">";
end,

adjustGlue = function (self, adjustment)
self.height.length = self.height.length:absolute() adjustment
self.height.stretch = SILE.measurement(0)
self.height.shrink = SILE.measurement(0)
self.adjustment = adjustment
end,

outputYourself = function (_, typesetter, line)
typesetter.frame:advancePageDirection(line.height:absolute() line.depth:absolute())
outputYourself = function (self, typesetter, line)
typesetter.frame:advancePageDirection(line.height:absolute() line.depth:absolute() self.adjustment)
end,

unbox = function (self) return { self } end
Expand Down Expand Up @@ -458,8 457,8 @@ nodefactory.vbox = pl.class({
self.nodes = {}
nodefactory.box._init(self, spec)
for _, node in ipairs(self.nodes) do
self.depth = math.max(SU.cast("length", node.depth), self.depth)
self.height = math.max(SU.cast("length", node.height), self.height)
self.depth = math.max(node.depth, self.depth)
self.height = math.max(node.height, self.height)
end
end,

Expand Down

0 comments on commit 8c38979

Please sign in to comment.