tether icon indicating copy to clipboard operation
tether copied to clipboard

Constraints `together` fail if attachment = targetAtachment

Open dryoma opened this issue 10 years ago • 1 comments

Hi.

When the element is positioned like "inside" a target, i.e. when attachment is the same as targetAttachment, Tether seems to fail flipping the elements

I expected this configuration

new Tether({
    element: '.element',
    target: '.target',
    attachment: 'top left',
    targetAttachment: 'top left',
    constraints: [{
        to: 'window',
        attachment: 'together'
    }]
});

on this page to:

  • attach the top right corner of the element to the top right corner of the target, since with default top left-top left the element goes beyond the window borders; instead it sticks to the default top left no matter what;
  • on vertical scroll Tether behaves really odd: it flips top left-top left to bottom left-bottom left so that the element goes out of sight long before it should.

I should mention that the example is a modified examples/testbed/index.html from the repository. There at least horizontal flipping works while the vertical one fails the same way. Didn't study the code, but it might have something to do with the sizes of the target and the element.

dryoma avatar Apr 16 '15 08:04 dryoma

is anybody addressing this issue?

yairEO avatar Aug 27 '15 22:08 yairEO