Skip to content

Commit

Permalink
v1.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Jun 3, 2019
1 parent 685177b commit 3e54d66
Show file tree
Hide file tree
Showing 28 changed files with 3,122 additions and 3,106 deletions.
10 changes: 5 additions & 5 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: Required<Interact.Rect>;
start: Interact.FullRect;
current: Interact.Rect;
inverted: Required<Interact.Rect>;
previous: Required<Interact.Rect>;
delta: Required<Interact.Rect>;
inverted: Interact.FullRect;
previous: Interact.FullRect;
delta: Interact.FullRect;
};
resizeStartAspectRatio: number;
}
Expand All @@ -39,7 +39,7 @@ declare module '@interactjs/core/scope' {
}
}
export interface ResizeEvent extends Interact.InteractEvent<ActionName.Resize> {
deltaRect?: Required<Interact.Rect>;
deltaRect?: Interact.FullRect;
}
declare function install(scope: Scope): void;
declare const resize: {
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/resize.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/InteractEvent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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>;
rect: Interact.FullRect;
x0: number;
y0: number;
t0: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/InteractEvent.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions packages/interact/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import modifiersBase from '@interactjs/modifiers/base';
import * as pointerEvents from '@interactjs/pointer-events';
import reflow from '@interactjs/reflow';
import interact from './interact';
export declare function init(window: Window): typeof interact;
export declare namespace init {
declare function init(window: Window): typeof interact;
declare namespace init {
var version: string;
}
export default init;
export default interact;
export { interact, actions, autoScroll, interactablePreventDefault, inertia, modifiersBase as modifiers, pointerEvents, reflow, };
4 changes: 2 additions & 2 deletions packages/interact/interact.js

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions packages/interactjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ var pixelSize = 16;
interact('.rainbow-pixel-canvas')
.origin('self')
.draggable({
modifiers: [{
// snap to the corners of a grid
type: 'snap',
targets: [
interact.snappers.grid({ x: pixelSize, y: pixelSize }),
],
}],
modifiers: [
interact.modifiers.snap({
// snap to the corners of a grid
targets: [
interact.snappers.grid({ x: pixelSize, y: pixelSize }),
],
})
],
})
// draw colored squares on move
.on('dragmove', function (event) {
Expand Down
2 changes: 1 addition & 1 deletion packages/interactjs/dist/api/doclets.json

Large diffs are not rendered by default.

Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
10 changes: 5 additions & 5 deletions packages/interactjs/dist/api/packages_actions_resize.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ <h1 class="page-title">packages/actions/resize.ts</h1>
interface Interaction {
resizeAxes: 'x' | 'y' | 'xy'
resizeRects: {
start: Required&lt;Interact.Rect>
start: Interact.FullRect
current: Interact.Rect
inverted: Required&lt;Interact.Rect>
previous: Required&lt;Interact.Rect>
delta: Required&lt;Interact.Rect>
inverted: Interact.FullRect
previous: Interact.FullRect
delta: Interact.FullRect
}
resizeStartAspectRatio: number
}
Expand Down Expand Up @@ -93,7 +93,7 @@ <h1 class="page-title">packages/actions/resize.ts</h1>
(ActionName as any).Resize = 'resize'

export interface ResizeEvent extends Interact.InteractEvent&lt;ActionName.Resize> {
deltaRect?: Required&lt;Interact.Rect>
deltaRect?: Interact.FullRect
}

function install (scope: Scope) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h1 class="page-title">packages/core/InteractEvent.ts</h1>
page: Interact.Point
client: Interact.Point
delta: Interact.Point
rect: Required&lt;Interact.Rect>
rect: Interact.FullRect
x0: number
y0: number
t0: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ <h1 class="page-title">packages/core/Interaction.ts</h1>
}

pointerMove (pointer: Interact.PointerType, event: Interact.PointerEventType, eventTarget: Node) {
if (!this.simulation) {
if (!this.simulation &amp;&amp; !(this.modifiers &amp;&amp; this.modifiers.endPrevented)) {
this.updatePointer(pointer, event, eventTarget, false)
utils.pointer.setCoords(this.coords.cur, this.pointers.map((p) => p.pointer), this._now())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ <h1 class="page-title">packages/interact/interact.ts</h1>

// Stop related interactions when an Interactable is unset
for (const interaction of scope.interactions.list) {
if (interaction.interactable === interactable &amp;&amp; interaction.interacting() &amp;&amp; interaction._ending) {
if (interaction.interactable === interactable &amp;&amp; interaction.interacting() &amp;&amp; !interaction._ending) {
interaction.stop()
}
}
Expand Down
Loading

0 comments on commit 3e54d66

Please sign in to comment.