Skip to content

Commit

Permalink
v1.4.0-rc.9
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Apr 5, 2019
1 parent 653c42d commit 5ff448b
Show file tree
Hide file tree
Showing 13 changed files with 1,101 additions and 1,006 deletions.
6 changes: 3 additions & 3 deletions packages/auto-scroll/index.js

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions packages/core/InteractableSet.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Signals from '@interactjs/utils/Signals';
export default class InteractableSet {
protected scope: Interact.Scope;
signals: Signals;
list: Interact.Interactable[];
selectorMap: {
[selector: string]: Array<{
context: Document | Element;
interactable: Interact.Interactable;
}>;
};
constructor(scope: Interact.Scope);
new(target: Interact.Target, options?: any): Interact.Interactable;
get(target: Interact.Target, options: any): any;
forEachMatch(element: Document | Element, callback: (interactable: any) => any): any;
}
83 changes: 83 additions & 0 deletions packages/core/InteractableSet.js

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

12 changes: 2 additions & 10 deletions packages/core/scope.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as utils from '@interactjs/utils';
import defaults from './defaultOptions';
import Eventable from './Eventable';
import InteractableBase from './Interactable';
import InteractableSet from './InteractableSet';
import InteractEvent from './InteractEvent';
export declare enum ActionName {
}
Expand All @@ -20,6 +21,7 @@ export interface Plugin {
[key: string]: any;
}
export declare class Scope {
id: string;
signals: utils.Signals;
browser: {
init: (window: any) => void;
Expand Down Expand Up @@ -97,14 +99,4 @@ export declare class Scope {
getDocOptions(doc: Document): any;
now(): number;
}
export declare class InteractableSet {
protected scope: Scope;
signals: utils.Signals;
list: InteractableBase[];
constructor(scope: Scope);
new(target: Interact.Target, options?: any): InteractableBase;
indexOfElement(target: Interact.Target, context: Document | Element): number;
get(element: Interact.Target, options: any, dontCheckInContext?: boolean): InteractableBase;
forEachMatch(element: Document | Element, callback: (interactable: any) => any): any;
}
export declare function initScope(scope: Scope, window: Window): Scope;
60 changes: 3 additions & 57 deletions packages/core/scope.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/interact/interact.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export declare const interact: InteractStatic;
declare function use(plugin: Interact.Plugin, options?: {
[key: string]: any;
}): InteractStatic;
declare function isSet(element: Element, options?: any): boolean;
declare function isSet(target: Element, options?: any): boolean;
declare function on(type: string | Interact.EventTypes, listener: Interact.ListenersArg, options?: any): InteractStatic;
declare function off(type: any, listener: any, options: any): InteractStatic;
declare function debug(): Scope;
Expand Down
6 changes: 3 additions & 3 deletions packages/interact/interact.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/interactjs/dist/docs/doclets.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ <h1 class="page-title">packages/interact/interact.ts</h1>
* passed to interact
*/
interact.isSet = isSet
function isSet (element: Element, options?: any) {
return scope.interactables.indexOfElement(element, options &amp;&amp; options.context) !== -1
function isSet (target: Element, options?: any) {
return !!scope.interactables.get(target, options &amp;&amp; options.context)
}

/**
Expand Down
Loading

0 comments on commit 5ff448b

Please sign in to comment.