Skip to content

Difference between 'together' and 'both' attachment #132

Open
@adamyonk

Description

@adamyonk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions