mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[sortablejs] adds some missing event properties (#41160)
* [sortablejs] creates clear description for fake class * [sortablejs] add some swap and multidrag event options
This commit is contained in:
committed by
Daniel Rosenwasser
parent
9f50313b4a
commit
4e6bf5b5f4
20
types/sortablejs/index.d.ts
vendored
20
types/sortablejs/index.d.ts
vendored
@@ -96,7 +96,7 @@ declare namespace Sortable {
|
||||
SwapOptions {}
|
||||
|
||||
/**
|
||||
* A class that all plugins inherit from for the sake of types
|
||||
* A class that all plugins inherit from for the sake of type inference.
|
||||
*/
|
||||
export class Plugin extends SortablePlugin {}
|
||||
export class MultiDrag extends MultiDragPlugin {}
|
||||
@@ -139,6 +139,24 @@ declare namespace Sortable {
|
||||
* Pull mode if dragging into another sortable
|
||||
*/
|
||||
pullMode: 'clone' | boolean | undefined;
|
||||
/**
|
||||
* When MultiDrag is used to sort, this holds a HTMLElement and oldIndex for each item selected.
|
||||
*
|
||||
* `oldIndicies[number]` is directly related to `newIndicies[number]`
|
||||
*
|
||||
* If MultiDrag is not used to sort, this array will be empty.
|
||||
*/
|
||||
oldIndicies: { multiDragElement: HTMLElement; index: number }[];
|
||||
/**
|
||||
* When MultiDrag is used to sort, this holds a HTMLElement and newIndex for each item.
|
||||
*
|
||||
* `oldIndicies[number]` is directly related to `newIndicies[number]`
|
||||
*
|
||||
* If MultiDrag is not used to sort, this array will be empty.
|
||||
*/
|
||||
newIndicies: { multiDragElement: HTMLElement; index: number }[];
|
||||
/** When Swap is used to sort, this will contain the dragging item that was dropped on.*/
|
||||
swapItem: HTMLElement | null;
|
||||
}
|
||||
|
||||
export interface MoveEvent extends Event {
|
||||
|
||||
Reference in New Issue
Block a user