tether
tether copied to clipboard
Switch offset when switching attachment as result of a constraint
When using a constraint, e.g. together
to switch both the attachments of element
and target
, the defined offset
is not inverted.
Example element is positioned like a dropdown, 6px below the target.
new Tether({
element: this.el,
attachment: 'top center',
target: this.target,
targetAttachment: 'bottom center',
offset: '-6px 0',
constraints: [{ to: 'scrollParent', attachment: 'together' }]
});
When switching both attachments, for example to attachment bottom center
and targetAttachment top center
due to constaint, the target is not 6px above the target - which it should be.
+1
+1
maybe anyone knows a workaround for this?
UPD. Found myself https://github.com/HubSpot/tether/issues/106#issuecomment-124054147