Skip to content

Latest commit

 

History

History
195 lines (119 loc) · 15.3 KB

CHANGELOG.md

File metadata and controls

195 lines (119 loc) · 15.3 KB

@dnd-kit/modifiers

9.0.0

Patch Changes

8.0.0

Patch Changes

7.0.0

Patch Changes

6.0.1

Patch Changes

6.0.0

Patch Changes

5.0.0

Minor Changes

  • #567 cd3adf3 Thanks @clauderic! - Update modifiers to use draggingNodeRect instead of activeNodeRect. Modifiers should be based on the rect of the node being dragged, whether it is the draggable node or drag overlay node.

  • #518 6310227 Thanks @clauderic! - Major internal refactor of measuring and collision detection.

    Summary of changes

    Previously, all collision detection algorithms were relative to the top and left points of the document. While this approach worked in most situations, it broke down in a number of different use-cases, such as fixed position droppable containers and trying to drag between containers that had different scroll positions.

    This new approach changes the frame of comparison to be relative to the viewport. This is a major breaking change, and will need to be released under a new major version bump.

    Breaking changes:

    • By default, @dnd-kit now ignores only the transforms applied to the draggable / droppable node itself, but considers all the transforms applied to its ancestors. This should provide the right balance of flexibility for most consumers.
      • Transforms applied to the droppable and draggable nodes are ignored by default, because the recommended approach for moving items on the screen is to use the transform property, which can interfere with the calculation of collisions.
      • Consumers can choose an alternate approach that does consider transforms for specific use-cases if needed by configuring the measuring prop of . Refer to the example.
    • Reduced the number of concepts related to measuring from ViewRect, LayoutRect to just a single concept of ClientRect.
      • The ClientRect interface no longer holds the offsetTop and offsetLeft properties. For most use-cases, you can replace offsetTop with top and offsetLeft with left.
      • Replaced the following exports from the @dnd-kit/core package with getClientRect:
        • getBoundingClientRect
        • getViewRect
        • getLayoutRect
        • getViewportLayoutRect
    • Removed translatedRect from the SensorContext interface. Replace usage with collisionRect.
    • Removed activeNodeClientRect on the DndContext interface. Replace with activeNodeRect.

Patch Changes

4.0.0

Minor Changes

Patch Changes

3.0.0

Patch Changes

2.1.0

Minor Changes

  • 68960c4 #295 Thanks @akhmadullin! - @dnd-kit/core is now a peerDependency rather than a dependency for other @dnd-kit packages that depend on it, such as @dnd-kit/sortable and @dnd-kit/modifiers. This is done to avoid issues with multiple versions of @dnd-kit/core being installed by some package managers such as Yarn 2.

Patch Changes

2.0.0

Major Changes

  • a9d92cf #174 Thanks @clauderic! - Distributed assets now only target modern browsers. Browserlist config:

    defaults
    last 2 version
    not IE 11
    not dead
    

    If you need to support older browsers, include the appropriate polyfills in your project's build process.

Patch Changes

1.0.5

Patch Changes

1.0.4

Patch Changes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

Patch Changes

0.1.0

Minor Changes

Patch Changes