-
Notifications
You must be signed in to change notification settings - Fork 784
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
255 changed files
with
29,177 additions
and
19,175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "1.4.0-alpha.17", | ||
"version": "1.4.0-alpha.18", | ||
"packages": [ | ||
".", | ||
"packages/*" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2012-2018 Taye Adeyemi <[email protected]> | ||
Copyright (c) 2012-2019 Taye Adeyemi <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { Scope } from '@interactjs/core/scope'; | ||
declare module '@interactjs/core/Interactable' { | ||
interface Interactable { | ||
draggable?: (options: any) => Interactable | { | ||
[key: string]: any; | ||
}; | ||
} | ||
} | ||
declare module '@interactjs/core/defaultOptions' { | ||
interface Defaults { | ||
drag?: any; | ||
} | ||
} | ||
declare module '@interactjs/core/scope' { | ||
interface Actions { | ||
drag?: typeof drag; | ||
} | ||
} | ||
declare function install(scope: Scope): void; | ||
declare function beforeMove({ interaction }: { | ||
interaction: any; | ||
}): void; | ||
declare function move({ iEvent, interaction }: { | ||
iEvent: any; | ||
interaction: any; | ||
}): void; | ||
/** | ||
* ```js | ||
* interact(element).draggable({ | ||
* onstart: function (event) {}, | ||
* onmove : function (event) {}, | ||
* onend : function (event) {}, | ||
* | ||
* // the axis in which the first movement must be | ||
* // for the drag sequence to start | ||
* // 'xy' by default - any direction | ||
* startAxis: 'x' || 'y' || 'xy', | ||
* | ||
* // 'xy' by default - don't restrict to one axis (move in any direction) | ||
* // 'x' or 'y' to restrict movement to either axis | ||
* // 'start' to restrict movement to the axis the drag started in | ||
* lockAxis: 'x' || 'y' || 'xy' || 'start', | ||
* | ||
* // max number of drags that can happen concurrently | ||
* // with elements of this Interactable. Infinity by default | ||
* max: Infinity, | ||
* | ||
* // max number of drags that can target the same element+Interactable | ||
* // 1 by default | ||
* maxPerElement: 2 | ||
* }); | ||
* | ||
* var isDraggable = interact('element').draggable(); // true | ||
* ``` | ||
* | ||
* Get or set whether drag actions can be performed on the target | ||
* | ||
* @alias Interactable.prototype.draggable | ||
* | ||
* @param {boolean | object} [options] true/false or An object with event | ||
* listeners to be fired on drag events (object makes the Interactable | ||
* draggable) | ||
* @return {boolean | Interactable} boolean indicating if this can be the | ||
* target of drag events, or this Interctable | ||
*/ | ||
declare function draggable(options: any): any; | ||
declare const drag: { | ||
install: typeof install; | ||
draggable: typeof draggable; | ||
beforeMove: typeof beforeMove; | ||
move: typeof move; | ||
defaults: { | ||
startAxis: string; | ||
lockAxis: string; | ||
}; | ||
checker(_pointer: any, _event: any, interactable: any): { | ||
name: string; | ||
axis: any; | ||
}; | ||
getCursor(): string; | ||
}; | ||
export default drag; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Interactable from '@interactjs/core/Interactable'; | ||
import InteractEvent from '@interactjs/core/InteractEvent'; | ||
import Interaction from '@interactjs/core/Interaction'; | ||
declare class DropEvent { | ||
type: string; | ||
target: Element; | ||
currentTarget: Element; | ||
dropzone: Interactable; | ||
dragEvent: InteractEvent; | ||
relatedTarget: Element; | ||
interaction: Interaction; | ||
draggable: Interactable; | ||
timeStamp: number; | ||
propagationStopped: boolean; | ||
immediatePropagationStopped: boolean; | ||
/** | ||
* Class of events fired on dropzones during drags with acceptable targets. | ||
*/ | ||
constructor(dropStatus: any, dragEvent: any, type: any); | ||
/** | ||
* If this is a `dropactivate` event, the dropzone element will be | ||
* deactivated. | ||
* | ||
* If this is a `dragmove` or `dragenter`, a `dragleave` will be fired on the | ||
* dropzone element and more. | ||
*/ | ||
reject(): void; | ||
preventDefault(): void; | ||
stopPropagation(): void; | ||
stopImmediatePropagation(): void; | ||
} | ||
export default DropEvent; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.