tether icon indicating copy to clipboard operation
tether copied to clipboard

Difference between 'together' and 'both' attachment

Open adamyonk opened this issue 9 years ago • 2 comments

Hello, I'm trying to understand why this tether attached with 'together':

tether

new Tether({
  enabled: false # enabled later
  element: @$tooltip
  target: @$bubble.querySelector('div')
  attachment: 'top right'
  targetAttachment: 'bottom right'
  constraints: [
    {
      attachment: 'together'
      to: 'window'
    }
  ]
})

is not correcting it's attachment correctly on the window edge, but this one using 'both' does:

tether2

new Tether({
  enabled: false # enabled later
  element: @$tooltip
  target: @$bubble.querySelector('div')
  attachment: 'top right'
  targetAttachment: 'bottom right'
  constraints: [
    {
      attachment: 'both'
      to: 'window'
    }
  ]
})

I like how 'together' handles the switch better, but it's not working around the window edges in cases like this and I can't figure out why.

adamyonk avatar Oct 27 '15 15:10 adamyonk

Beautiful green styles @adamyonk :+1:

adamschwartz avatar Oct 27 '15 16:10 adamschwartz

Having this exact same issue, have you learned anything between then and now?

hasPatrickC avatar Dec 31 '15 19:12 hasPatrickC