Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pairwise dragging #67

Merged
merged 3 commits into from
Oct 12, 2024
Merged

Pairwise dragging #67

merged 3 commits into from
Oct 12, 2024

Commits on Oct 11, 2024

  1. Format README.md

    julienvincent committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    c20f7bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de1c08f View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2024

  1. Implement pairwise element dragging

    This adds two new APIs - `drag_pair_forwards` and its companion
    `drag_pair_backwards` which allow dragging 'pairs' of elements within a
    form.
    
    An easy example is the key-value pairs within a map which typically are
    meant to stay together when reordering.
    
    This can, however, be used for any form. This means if you have some
    vector containing logical pairs (because of the actual semantics of your
    code) you can use a dedicated keybinding to drag them around together.
    
    This change also introduces a new config option at:
    
    `dragging.auto_drag_pairs = true|false`
    
    which will alter the behaviour of the existing `drag_element_forwards`
    and `drag_element_backwards` APIs in order to try infer whether they are
    contained within a node that is made up of pairs.
    
    For example if this setting is `true` and a `drag_element_forwards` is
    used on the keys of a map then they will be dragged pairwise.
    
    This new config option defaults to `true` under the assumption that this
    is generally the desired behaviour.
    julienvincent committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    cf1b77f View commit details
    Browse the repository at this point in the history