Skip to content

Commit

Permalink
v
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Apr 18, 2019
1 parent 018403e commit d259edb
Show file tree
Hide file tree
Showing 48 changed files with 7,525 additions and 7,376 deletions.
4 changes: 2 additions & 2 deletions packages/actions/drag.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/actions/drop/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/actions/gesture.js

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions packages/actions/resize.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ declare module '@interactjs/core/Interaction' {
interface Interaction {
resizeAxes: 'x' | 'y' | 'xy';
resizeRects: {
start: Interact.Rect;
start: Required<Interact.Rect>;
current: Interact.Rect;
inverted: Interact.Rect;
previous: Interact.Rect;
delta: Interact.Rect;
inverted: Required<Interact.Rect>;
previous: Required<Interact.Rect>;
delta: Required<Interact.Rect>;
};
resizeStartAspectRatio: number;
}
Expand All @@ -39,8 +39,7 @@ declare module '@interactjs/core/scope' {
}
}
export interface ResizeEvent extends Interact.InteractEvent<ActionName.Resize> {
deltaRect?: Interact.Rect;
rect?: Interact.Rect;
deltaRect?: Required<Interact.Rect>;
}
declare function install(scope: Scope): void;
declare const resize: {
Expand Down
8 changes: 4 additions & 4 deletions packages/actions/resize.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions packages/auto-start/InteractableMethods.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/InteractEvent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export declare class InteractEvent<T extends ActionName = any, P extends EventPh
page: Interact.Point;
client: Interact.Point;
delta: Interact.Point;
rect: Required<Interact.Rect>;
x0: number;
y0: number;
t0: number;
Expand Down
3 changes: 2 additions & 1 deletion packages/core/InteractEvent.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/core/Interactable.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions packages/core/Interaction.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface StartAction extends ActionProps {
export declare class Interaction<T extends ActionName = any> {
interactable: Interactable;
element: Element;
rect: Interact.Rect & Interact.Rect3;
rect: Interact.Rect & Interact.Size;
edges: {
[P in keyof Interact.Rect]?: boolean;
};
Expand Down Expand Up @@ -114,14 +114,14 @@ export declare class Interaction<T extends ActionName = any> {
* })
* // start dragging after the user holds the pointer down
* .on('hold', function (event) {
* var interaction = event.interaction;
* var interaction = event.interaction
*
* if (!interaction.interacting()) {
* interaction.start({ name: 'drag' },
* event.interactable,
* event.currentTarget);
* event.currentTarget)
* }
* });
* })
* ```
*
* Start an action with the given Interactable and Element as tartgets. The
Expand All @@ -145,11 +145,11 @@ export declare class Interaction<T extends ActionName = any> {
* .on('dragmove', function (event) {
* if (someCondition) {
* // change the snap settings
* event.interactable.draggable({ snap: { targets: [] }});
* event.interactable.draggable({ snap: { targets: [] }})
* // fire another move event with re-calculated snap
* event.interaction.move();
* event.interaction.move()
* }
* });
* })
* ```
*
* Force a move of the current action at the same coordinates. Useful if
Expand All @@ -166,11 +166,11 @@ export declare class Interaction<T extends ActionName = any> {
* .on('move', function (event) {
* if (event.pageX > 1000) {
* // end the current action
* event.interaction.end();
* event.interaction.end()
* // stop all further listeners from being called
* event.stopImmediatePropagation();
* event.stopImmediatePropagation()
* }
* });
* })
* ```
*
* @param {PointerEvent} [event]
Expand Down
22 changes: 12 additions & 10 deletions packages/core/Interaction.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions packages/core/Interaction.spec.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions packages/core/interactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ declare module '@interactjs/core/scope' {
}
declare function install(scope: Scope): void;
declare function doOnInteractions(method: any, scope: any): (event: any) => void;
export declare function newInteraction(options: any, scope: any): any;
declare function onDocSignal({ doc, scope, options }: {
doc: any;
scope: any;
Expand All @@ -30,7 +29,6 @@ declare const _default: {
install: typeof install;
onDocSignal: typeof onDocSignal;
doOnInteractions: typeof doOnInteractions;
newInteraction: typeof newInteraction;
methodNames: string[];
};
export default _default;
14 changes: 5 additions & 9 deletions packages/core/interactions.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/core/interactions.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d259edb

Please sign in to comment.