1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
calc(top_overflow, -ly1 + global.area.pixely + openheight/2);
calc(bottom_overflow, ly2 - global.area.pixely + openheight/2 - global.area.pixelheight);
if(cb.parent,
<!-- no vertical offset inside other layers, do only a height clipping -->
Math.max(max_overflow, top_overflow, bottom_overflow, 0);
sub(openheight, max_overflow);
,
if(iscentered,
if(openheight GE (global.area.pixelheight - 20),
set(yoffset,0);
,
if(top_overflow GT 0, calc(yoffset, cb.y + top_overflow); );
if(bottom_overflow GT 0, calc(yoffset, cb.y - bottom_overflow); );
);
,
indexoftxt(isbottomalign, get(cb_edge), 'bottom');
if(space_above GT space_below,
if(isbottomalign LT 0, calc(yoffset, cb.y - openheight + cbheight); );
,
if(isbottomalign GE 0, calc(yoffset, cb.y - openheight + cbheight); );
);
);
);
|