mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-08 10:06:39 +02:00
2d bugfix
This commit is contained in:
@@ -923,7 +923,9 @@ module attach(parent, child, overlap, align, spin=0, norot, inset=0, shiftout=0,
|
|||||||
str("Invalid alignment: align value (",align,") includes component parallel to parent anchor (",anchor,")"));
|
str("Invalid alignment: align value (",align,") includes component parallel to parent anchor (",anchor,")"));
|
||||||
pos = is_undef(align) ? anchor_data[1] : _find_anchor(anchor+align, $parent_geom)[1];
|
pos = is_undef(align) ? anchor_data[1] : _find_anchor(anchor+align, $parent_geom)[1];
|
||||||
$attach_anchor = list_set(anchor_data, 1, pos); ///
|
$attach_anchor = list_set(anchor_data, 1, pos); ///
|
||||||
startdir = anchor==UP || anchor==DOWN ? BACK : UP - (anchor*UP)*anchor/(anchor*anchor);
|
startdir = two_d? undef
|
||||||
|
: anchor==UP || anchor==DOWN ? BACK
|
||||||
|
: UP - (anchor*UP)*anchor/(anchor*anchor);
|
||||||
enddir = is_undef(child) || child.z==0 ? UP : BACK;
|
enddir = is_undef(child) || child.z==0 ? UP : BACK;
|
||||||
child_adjustment = is_undef(align)? CTR
|
child_adjustment = is_undef(align)? CTR
|
||||||
: two_d ? rot(to=factor*child,from=-anchor,p=align)
|
: two_d ? rot(to=factor*child,from=-anchor,p=align)
|
||||||
|
Reference in New Issue
Block a user