@interactjs/utils
Advanced tools
Comparing version 1.6.2 to 1.6.3
@@ -1,4 +0,7 @@ | ||
export default function (target: any, element: any, action?: any): { | ||
import { HasGetRect } from '@interactjs/types/types'; | ||
export default function (target: HasGetRect & { | ||
options: Interact.PerActionDefaults; | ||
}, element: any, action?: any): { | ||
x: any; | ||
y: any; | ||
}; |
@@ -9,2 +9,2 @@ import { rectToXY, resolveRectLike } from './rect'; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0T3JpZ2luWFkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJnZXRPcmlnaW5YWS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLGVBQWUsRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUVsRCxNQUFNLENBQUMsT0FBTyxXQUFXLE1BQU0sRUFBRSxPQUFPLEVBQUUsTUFBTztJQUMvQyxNQUFNLGFBQWEsR0FBRyxNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBQzVDLE1BQU0sWUFBWSxHQUFHLGFBQWEsSUFBSSxhQUFhLENBQUMsTUFBTSxDQUFBO0lBQzFELE1BQU0sTUFBTSxHQUFHLFlBQVksSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQTtJQUVwRCxNQUFNLFVBQVUsR0FBRyxlQUFlLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsQ0FBQyxNQUFNLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQTtJQUVoRixPQUFPLFFBQVEsQ0FBQyxVQUFVLENBQUMsSUFBSSxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFBO0FBQy9DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyByZW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": "MIT", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -1,3 +0,3 @@ | ||
export declare function getStringOptionResult(value: any, interactable: any, element: any): any; | ||
export declare function resolveRectLike<T extends any[]>(value: Interact.RectResolvable<T>, interactable?: any, element?: any, functionArgs?: T): import("../types/types").Rect; | ||
export declare function getStringOptionResult(value: any, target: Interact.HasGetRect, element: any): any; | ||
export declare function resolveRectLike<T extends any[]>(value: Interact.RectResolvable<T>, target?: Interact.HasGetRect, element?: Interact.Element, functionArgs?: T): import("../types/types").Rect; | ||
export declare function rectToXY(rect: any): { | ||
@@ -4,0 +4,0 @@ x: any; |
10
rect.js
import { closest, getElementRect, parentNode } from './domUtils'; | ||
import extend from './extend'; | ||
import * as is from './is'; | ||
export function getStringOptionResult(value, interactable, element) { | ||
export function getStringOptionResult(value, target, element) { | ||
if (value === 'parent') { | ||
@@ -9,9 +9,9 @@ return parentNode(element); | ||
if (value === 'self') { | ||
return interactable.getRect(element); | ||
return target.getRect(element); | ||
} | ||
return closest(element, value); | ||
} | ||
export function resolveRectLike(value, interactable, element, functionArgs) { | ||
export function resolveRectLike(value, target, element, functionArgs) { | ||
if (is.string(value)) { | ||
value = getStringOptionResult(value, interactable, element); | ||
value = getStringOptionResult(value, target, element); | ||
} | ||
@@ -59,2 +59,2 @@ else if (is.func(value)) { | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInJlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxjQUFjLEVBQUUsVUFBVSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ2hFLE9BQU8sTUFBTSxNQUFNLFVBQVUsQ0FBQTtBQUM3QixPQUFPLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUUxQixNQUFNLFVBQVUscUJ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ICB8fCAocmVjdC50b3AgKyByZWN0LmhlaWdodClcbiAgfVxuXG4gIHJldHVybiByZWN0XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB0bGJyVG9YeXdoIChyZWN0KSB7XG4gIGlmIChyZWN0ICYmICEoJ3gnIGluIHJlY3QgJiYgJ3knIGluIHJlY3QpKSB7XG4gICAgcmVjdCA9IGV4dGVuZCh7fSwgcmVjdClcblxuICAgIHJlY3QueCAgICAgID0gcmVjdC5sZWZ0IHx8IDBcbiAgICByZWN0LnkgICAgICA9IHJlY3QudG9wICB8fCAwXG4gICAgcmVjdC53aWR0aCAgPSByZWN0LndpZHRoICB8fCAocmVjdC5yaWdodCAgLSByZWN0LngpXG4gICAgcmVjdC5oZWlnaHQgPSByZWN0LmhlaWdodCB8fCAocmVjdC5ib3R0b20gLSByZWN0LnkpXG4gIH1cblxuICByZXR1cm4gcmVjdFxufVxuXG5leHBvcnQgZGVmYXVsdCB7XG4gIGdldFN0cmluZ09wdGlvblJlc3VsdCxcbiAgcmVzb2x2ZVJlY3RMaWtlLFxuICByZWN0VG9YWSxcbiAgeHl3aFRvVGxicixcbiAgdGxiclRvWHl3aCxcbn1cbiJdfQ== |
export declare type SignalListener = (signalArg: PartialSignalArg, sinalName?: string) => (void | boolean); | ||
export interface SignalArg<T extends Interact.ActionName = any> { | ||
interaction: Interact.Interaction<T>; | ||
Interactable: Interact.Interactable; | ||
interactable: Interact.Interactable; | ||
iEvent: Interact.InteractEvent<T>; | ||
@@ -6,0 +6,0 @@ element: Interact.EventTarget; |
@@ -34,2 +34,2 @@ class Signals { | ||
export default Signals; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2lnbmFscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlNpZ25hbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZUEsTUFBTSxPQUFPO0lBQWI7UUFDRSxjQUFTLEdBRUwsRUF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4gIG9mZiAobmFtZTogc3RyaW5nLCBsaXN0ZW5lcjogU2lnbmFsTGlzdGVuZXIpIHtcbiAgICBpZiAoIXRoaXMubGlzdGVuZXJzW25hbWVdKSB7IHJldHVybiB9XG5cbiAgICBjb25zdCBpbmRleCA9IHRoaXMubGlzdGVuZXJzW25hbWVdLmluZGV4T2YobGlzdGVuZXIpXG5cbiAgICBpZiAoaW5kZXggIT09IC0xKSB7XG4gICAgICB0aGlzLmxpc3RlbmVyc1tuYW1lXS5zcGxpY2UoaW5kZXgsIDEpXG4gICAgfVxuICB9XG5cbiAgZmlyZSAobmFtZTogc3RyaW5nLCBhcmc6IFBhcnRpYWw8U2lnbmFsQXJnPik6IHZvaWQgfCBmYWxzZSB7XG4gICAgY29uc3QgdGFyZ2V0TGlzdGVuZXJzID0gdGhpcy5saXN0ZW5lcnNbbmFtZV1cblxuICAgIGlmICghdGFyZ2V0TGlzdGVuZXJzKSB7IHJldHVybiB9XG5cbiAgICBmb3IgKGNvbnN0IGxpc3RlbmVyIG9mIHRhcmdldExpc3RlbmVycykge1xuICAgICAgaWYgKGxpc3RlbmVyKGFyZywgbmFtZSkgPT09IGZhbHNlKSB7XG4gICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBTaWduYWxzXG4iXX0= |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167969
1630