@interactjs/modifiers
Advanced tools
Comparing version 1.5.1 to 1.5.2
@@ -10,3 +10,3 @@ import { Scope } from '@interactjs/core/scope'; | ||
modifiers?: { | ||
states: any[]; | ||
states: ModifierState[]; | ||
offsets: any; | ||
@@ -38,5 +38,3 @@ startOffset: any; | ||
} | ||
export interface Modifier<Name extends string = any, Defaults extends { | ||
enabled?: boolean; | ||
} = any> { | ||
export interface Modifier<Defaults = any, Name extends string = any> { | ||
options?: Defaults; | ||
@@ -46,3 +44,3 @@ methods: { | ||
set: (arg: Interact.SignalArg) => void; | ||
beforeEnd?: (arg: Interact.SignalArg) => void; | ||
beforeEnd?: (arg: Interact.SignalArg) => boolean | void; | ||
stop?: (arg: Interact.SignalArg) => void; | ||
@@ -52,2 +50,14 @@ }; | ||
} | ||
export declare type ModifierState<Defaults = {}, StateProps extends { | ||
[prop: string]: any; | ||
} = {}, Name extends string = any> = { | ||
options: Defaults; | ||
methods?: Modifier<Defaults>['methods']; | ||
index?: number; | ||
name?: Name; | ||
} & StateProps; | ||
export interface ModifierArg<State extends ModifierState> extends Interact.SignalArg { | ||
state: State; | ||
pageCoords?: Interact.Point; | ||
} | ||
declare function install(scope: Scope): void; | ||
@@ -87,3 +97,13 @@ declare function start({ interaction, phase }: Interact.SignalArg, pageCoords: Interact.Point): { | ||
declare function getModifierList(interaction: any): any; | ||
export declare function prepareStates(modifierList: any): any[]; | ||
export declare function prepareStates(modifierList: Modifier[]): { | ||
options: {}; | ||
methods?: { | ||
start?: (arg: import("../utils/Signals").SignalArg<any>) => void; | ||
set: (arg: import("../utils/Signals").SignalArg<any>) => void; | ||
beforeEnd?: (arg: import("../utils/Signals").SignalArg<any>) => boolean | void; | ||
stop?: (arg: import("../utils/Signals").SignalArg<any>) => void; | ||
}; | ||
index?: number; | ||
name?: any; | ||
}[]; | ||
declare function shouldDo(options: any, preEnd?: boolean, requireEndOnly?: boolean, phase?: string): any; | ||
@@ -96,9 +116,7 @@ declare function getRectOffset(rect: any, coords: any): { | ||
}; | ||
declare function makeModifier<Defaults extends { | ||
enabled?: boolean; | ||
}, Name extends string>(module: { | ||
declare function makeModifier<Defaults, Name extends string>(module: { | ||
defaults?: Defaults; | ||
[key: string]: any; | ||
}, name?: Name): { | ||
(_options?: Partial<Defaults>): Modifier<Name, Defaults>; | ||
(_options?: Partial<Defaults>): Modifier<Defaults, Name>; | ||
_defaults: Defaults; | ||
@@ -105,0 +123,0 @@ _methods: { |
23
base.js
@@ -15,6 +15,6 @@ import extend from '@interactjs/utils/extend'; | ||
}); | ||
interactions.signals.on('before-action-start', (arg) => { | ||
interactions.signals.on('before-action-start', arg => { | ||
start(arg, arg.interaction.coords.start.page); | ||
}); | ||
interactions.signals.on('action-resume', (arg) => { | ||
interactions.signals.on('action-resume', arg => { | ||
stop(arg); | ||
@@ -65,3 +65,4 @@ start(arg, arg.interaction.coords.cur.page); | ||
export function startAll(arg) { | ||
for (const state of arg.states) { | ||
const states = arg.states; | ||
for (const state of states) { | ||
if (state.methods.start) { | ||
@@ -191,8 +192,8 @@ arg.state = state; | ||
if (actionModifiers && actionModifiers.length) { | ||
return actionModifiers.filter((modifier) => !modifier.options || modifier.options.enabled !== false); | ||
return actionModifiers.filter(modifier => !modifier.options || modifier.options.enabled !== false); | ||
} | ||
return ['snap', 'snapSize', 'snapEdges', 'restrict', 'restrictEdges', 'restrictSize'] | ||
.map((type) => { | ||
.map(type => { | ||
const options = actionOptions[type]; | ||
return options && options.enabled && { | ||
return options && (options.enabled !== false) && { | ||
options, | ||
@@ -202,3 +203,3 @@ methods: options._methods, | ||
}) | ||
.filter((m) => !!m); | ||
.filter(m => !!m); | ||
} | ||
@@ -212,3 +213,3 @@ export function prepareStates(modifierList) { | ||
} | ||
const state = { | ||
states.push({ | ||
options, | ||
@@ -218,4 +219,3 @@ methods, | ||
name, | ||
}; | ||
states.push(state); | ||
}); | ||
} | ||
@@ -302,3 +302,2 @@ return states; | ||
const options = (_options || {}); | ||
options.enabled = options.enabled !== false; | ||
// add missing defaults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B7IFNjb3BlIH0gZnJvbSAnQGludGVyYWN0anMvY29yZS9zY29wZSdcbmltcG9ydCBleHRlbmQgZnJvbSAnQGludGVyYWN0anMvdXRpbHMvZXh0ZW5kJ1xuXG5kZWNsYXJlIG1vZHVsZSAnQGludGVyYWN0anMvY29yZS9zY29wZScge1xuICBpbnRlcmZhY2UgU2NvcGUge1xuICAgIG1vZGlmaWVycz86IGFueVxuICB9XG59XG5cbmRlY2xhcmUgbW9kdWxlICdAaW50ZXJhY3Rqcy9jb3JlL0ludGVyYWN0aW9uJyB7XG4gIGludGVyZmFjZSBJbnRlcmFjdGlvbiB7XG4gICAgbW9kaWZpZXJzPzoge1xuICAgICAgc3RhdGVzOiBhbnlbXVxuICAgICAgb2Zmc2V0czogYW55XG4gICAgICBzdGFydE9mZnNldDogYW55XG4gICAgICBzdGFydERlbHRhOiBJbnRlcmFjdC5Qb2ludFxuICAgICAgcmVzdWx0Pzoge1xuICAgICAgICBkZWx0YToge1xuICAgICAgICAgIHg6IG51bWJlclxuICAgICAgICAgIHk6IG51bWJlclxuICAgICAgICB9XG4gICAgICAgIHJlY3REZWx0YToge1xuICAgICAgICAgIGxlZnQ6IG51bWJlclxuICAgICAgICAgIHJpZ2h0OiBudW1iZXJcbiAgICAgICAgICB0b3A6IG51bWJlclxuICAgICAgICAgIGJvdHRvbTogbnVtYmVyXG4gICAgICAgIH1cbiAgICAgICAgY29vcmRzOiBJbnRlcmFjdC5Qb2ludFxuICAgICAgICBjaGFuZ2VkOiBib29sZWFuXG4gICAgICB9LFxuICAgICAgZW5kUHJldmVudGVkOiBib29sZWFuXG4gICAgfVxuICB9XG59XG5cbmRlY2xhcmUgbW9kdWxlICdAaW50ZXJhY3Rqcy9jb3JlL2RlZmF1bHRPcHRpb25zJyB7XG4gIGludGVyZmFjZSBQZXJBY3Rpb25EZWZhdWx0cyB7XG4gICAgbW9kaWZpZXJzPzogTW9kaWZpZXJbXVxuICB9XG59XG5cbmV4cG9ydCBpbnRlcmZhY2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4gIHJldHVybiBtb2RpZmllclxufVxuXG5leHBvcnQgZGVmYXVsdCB7XG4gIGlkOiAnbW9kaWZpZXJzL2Jhc2UnLFxuICBpbnN0YWxsLFxuICBzdGFydEFsbCxcbiAgc2V0QWxsLFxuICBwcmVwYXJlU3RhdGVzLFxuICBzdGFydCxcbiAgYmVmb3JlTW92ZSxcbiAgYmVmb3JlRW5kLFxuICBzdG9wLFxuICBzaG91bGREbyxcbiAgZ2V0TW9kaWZpZXJMaXN0LFxuICBnZXRSZWN0T2Zmc2V0LFxuICBtYWtlTW9kaWZpZXIsXG59XG5cbmV4cG9ydCB7XG4gIG1ha2VNb2RpZmllcixcbn1cbiJdfQ== |
export declare const snap: { | ||
(_options?: Partial<import("./snap/pointer").SnapOptions>): import("./base").Modifier<"snap", import("./snap/pointer").SnapOptions>; | ||
(_options?: Partial<import("./snap/pointer").SnapOptions>): import("./base").Modifier<import("./snap/pointer").SnapOptions, "snap">; | ||
_defaults: import("./snap/pointer").SnapOptions; | ||
@@ -12,4 +12,4 @@ _methods: { | ||
export declare const snapSize: { | ||
(_options?: Partial<Pick<import("./snap/pointer").SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">>): import("./base").Modifier<"snapSize", Pick<import("./snap/pointer").SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">>; | ||
_defaults: Pick<import("./snap/pointer").SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">; | ||
(_options?: Partial<Pick<import("./snap/pointer").SnapOptions, "offset" | "endOnly" | "targets" | "range">>): import("./base").Modifier<Pick<import("./snap/pointer").SnapOptions, "offset" | "endOnly" | "targets" | "range">, "snapSize">; | ||
_defaults: Pick<import("./snap/pointer").SnapOptions, "offset" | "endOnly" | "targets" | "range">; | ||
_methods: { | ||
@@ -23,4 +23,4 @@ start: any; | ||
export declare const snapEdges: { | ||
(_options?: Partial<Pick<import("./snap/pointer").SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">>): import("./base").Modifier<"snapEdges", Pick<import("./snap/pointer").SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">>; | ||
_defaults: Pick<import("./snap/pointer").SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">; | ||
(_options?: Partial<Pick<import("./snap/pointer").SnapOptions, "offset" | "endOnly" | "targets" | "range">>): import("./base").Modifier<Pick<import("./snap/pointer").SnapOptions, "offset" | "endOnly" | "targets" | "range">, "snapEdges">; | ||
_defaults: Pick<import("./snap/pointer").SnapOptions, "offset" | "endOnly" | "targets" | "range">; | ||
_methods: { | ||
@@ -34,3 +34,3 @@ start: any; | ||
export declare const restrict: { | ||
(_options?: Partial<import("./restrict/pointer").RestrictOptions>): import("./base").Modifier<"restrict", import("./restrict/pointer").RestrictOptions>; | ||
(_options?: Partial<import("./restrict/pointer").RestrictOptions>): import("./base").Modifier<import("./restrict/pointer").RestrictOptions, "restrict">; | ||
_defaults: import("./restrict/pointer").RestrictOptions; | ||
@@ -52,3 +52,3 @@ _methods: { | ||
}; | ||
}>): import("./base").Modifier<"restrictRect", import("./restrict/pointer").RestrictOptions & { | ||
}>): import("./base").Modifier<import("./restrict/pointer").RestrictOptions & { | ||
elementRect: { | ||
@@ -60,3 +60,3 @@ top: number; | ||
}; | ||
}>; | ||
}, "restrictRect">; | ||
_defaults: import("./restrict/pointer").RestrictOptions & { | ||
@@ -78,3 +78,3 @@ elementRect: { | ||
export declare const restrictEdges: { | ||
(_options?: Partial<import("./restrict/edges").RestrictEdgesOptions>): import("./base").Modifier<"restrictEdges", import("./restrict/edges").RestrictEdgesOptions>; | ||
(_options?: Partial<import("./restrict/edges").RestrictEdgesOptions>): import("./base").Modifier<import("./restrict/edges").RestrictEdgesOptions, "restrictEdges">; | ||
_defaults: import("./restrict/edges").RestrictEdgesOptions; | ||
@@ -89,3 +89,3 @@ _methods: { | ||
export declare const restrictSize: { | ||
(_options?: Partial<import("./restrict/size").RestrictSizeOptions>): import("./base").Modifier<"restrictSize", import("./restrict/size").RestrictSizeOptions>; | ||
(_options?: Partial<import("./restrict/size").RestrictSizeOptions>): import("./base").Modifier<import("./restrict/size").RestrictSizeOptions, "restrictSize">; | ||
_defaults: import("./restrict/size").RestrictSizeOptions; | ||
@@ -92,0 +92,0 @@ _methods: { |
{ | ||
"name": "@interactjs/modifiers", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"peerDependencies": { | ||
"@interactjs/core": "1.5.1", | ||
"@interactjs/utils": "1.5.1" | ||
"@interactjs/core": "1.5.2", | ||
"@interactjs/utils": "1.5.2" | ||
}, | ||
@@ -8,0 +8,0 @@ "publishConfig": { |
@@ -1,2 +0,2 @@ | ||
import Interaction from '@interactjs/core/Interaction'; | ||
import { ModifierArg, ModifierState } from '../base'; | ||
import { RestrictOptions } from './pointer'; | ||
@@ -6,15 +6,12 @@ export interface RestrictEdgesOptions { | ||
outer: RestrictOptions['restriction']; | ||
offset: RestrictOptions['offset']; | ||
offset?: RestrictOptions['offset']; | ||
endOnly: boolean; | ||
enabled: boolean; | ||
} | ||
declare function start({ interaction, state }: { | ||
interaction: Interaction; | ||
state: any; | ||
}): void; | ||
declare function set({ coords, interaction, state }: { | ||
coords: Interact.Point; | ||
interaction: Interaction; | ||
state: any; | ||
}): void; | ||
export declare type RestrictEdgesState = ModifierState<RestrictEdgesOptions, { | ||
inner: Interact.Rect; | ||
outer: Interact.Rect; | ||
offset: RestrictEdgesOptions['offset']; | ||
}>; | ||
declare function start({ interaction, state }: ModifierArg<RestrictEdgesState>): void; | ||
declare function set({ coords, interaction, state }: ModifierArg<RestrictEdgesState>): void; | ||
declare const restrictEdges: { | ||
@@ -21,0 +18,0 @@ noInner: { |
@@ -70,3 +70,2 @@ // This module adds the options.resize.restrictEdges setting which sets min and | ||
endOnly: false, | ||
enabled: false, | ||
}; | ||
@@ -82,2 +81,2 @@ const restrictEdges = { | ||
export default restrictEdges; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRnZXMuanM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cbmNvbnN0IHJlc3RyaWN0RWRnZXMgPSB7XG4gIG5vSW5uZXIsXG4gIG5vT3V0ZXIsXG4gIGdldFJlc3RyaWN0aW9uUmVjdCxcbiAgc3RhcnQsXG4gIHNldCxcbiAgZGVmYXVsdHMsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHJlc3RyaWN0RWRnZXNcbiJdfQ== |
@@ -0,1 +1,2 @@ | ||
import { ModifierArg, ModifierState } from '../base'; | ||
export interface RestrictOptions { | ||
@@ -6,11 +7,7 @@ restriction: Interact.RectResolvable<[number, number, Interact.Interaction]>; | ||
endOnly: boolean; | ||
enabled: boolean; | ||
} | ||
declare function start({ rect, startOffset, state, interaction, pageCoords }: { | ||
rect: any; | ||
startOffset: any; | ||
state: any; | ||
interaction: any; | ||
pageCoords: any; | ||
}): void; | ||
export declare type RestrictState = ModifierState<RestrictOptions, { | ||
offset: Interact.Rect; | ||
}>; | ||
declare function start({ rect, startOffset, state, interaction, pageCoords }: ModifierArg<RestrictState>): void; | ||
declare function set({ coords, interaction, state }: { | ||
@@ -17,0 +14,0 @@ coords: any; |
@@ -15,12 +15,14 @@ import extend from '@interactjs/utils/extend'; | ||
const restriction = getRestrictionRect(options.restriction, interaction, pageCoords); | ||
const widthDiff = (restriction.right - restriction.left) - rect.width; | ||
const heightDiff = (restriction.bottom - restriction.top) - rect.height; | ||
if (widthDiff < 0) { | ||
offset.left += widthDiff; | ||
offset.right += widthDiff; | ||
if (restriction) { | ||
const widthDiff = (restriction.right - restriction.left) - rect.width; | ||
const heightDiff = (restriction.bottom - restriction.top) - rect.height; | ||
if (widthDiff < 0) { | ||
offset.left += widthDiff; | ||
offset.right += widthDiff; | ||
} | ||
if (heightDiff < 0) { | ||
offset.top += heightDiff; | ||
offset.bottom += heightDiff; | ||
} | ||
} | ||
if (heightDiff < 0) { | ||
offset.top += heightDiff; | ||
offset.bottom += heightDiff; | ||
} | ||
offset.left += startOffset.left - (rect.width * elementRect.left); | ||
@@ -56,3 +58,2 @@ offset.top += startOffset.top - (rect.height * elementRect.top); | ||
endOnly: false, | ||
enabled: false, | ||
}; | ||
@@ -66,2 +67,2 @@ const restrict = { | ||
export default restrict; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9pbnRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBvaW50ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxNQUFNLE1BQU0sMEJBQTBCLENBQUE7QUFDN0MsT0FBTyxLQUFLLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtBQUMxQyxPQUFPLFNBQVMsTUFBTSx3QkFBd0IsQ0FBQTtBQWE5QyxTQUFTLEtBQUssQ0FBRSxFQUFFLElBQUksRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQUU7SUFDbkUsTUFBTSxFQUFFLE9BQU8sRUFBRSxHQUFHLEtBQUssQ0FBQTtJQUN6QixNQUFNLEVBQUUsV0FBVyxFQUFFLEdBQUcsT0FBTyxDQUFBO0lBQy9CLE1BQU0sTUFBTSxHQUFrQixNQUFNLENBQUM7UUFDbkMsSUFBSSxFQUFFLENBQUM7UUFDUCxHQUFHLEVBQUUsQ0FBQztRQUNOLEtBQUssRUFBRSxDQUFDO1FBQ1IsTUFBTSxFQUFFLENBQUM7S0FDVixFQUFFLE9BQU8sQ0FBQyxNQUFNLElBQUksRUFBRSxDQUFDLENBQUE7SUFFeEIsSUFBSSxJQUFJLElBQUksV0FBVyxFQUFFO1FBQ3ZCLE1BQU0sV0FBVyxHQUFHLGtCQUFrQixDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsV0FBVyxFQUFFLFVBQVUsQ0FBQyxDQUFBO1FBQ3BGLE1BQU0sU0FBUyxHQUFHLENBQUMsV0FBVyxDQUFDLEtBQUssR0FBRyxXQUFXLENBQUMsSUFBSSxDQUFDLEdBQU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BNYXRoLm1heChNYXRoLm1pbihyZWN0LmJvdHRvbSAtIG9mZnNldC5ib3R0b20sIGNvb3Jkcy55KSwgcmVjdC50b3AgICsgb2Zmc2V0LnRvcClcbn1cblxuZnVuY3Rpb24gZ2V0UmVzdHJpY3Rpb25SZWN0ICh2YWx1ZSwgaW50ZXJhY3Rpb24sIGNvb3Jkcz86IEludGVyYWN0LlBvaW50KSB7XG4gIGlmIChpcy5mdW5jKHZhbHVlKSkge1xuICAgIHJldHVybiByZWN0VXRpbHMucmVzb2x2ZVJlY3RMaWtlKHZhbHVlLCBpbnRlcmFjdGlvbi5pbnRlcmFjdGFibGUsIGludGVyYWN0aW9uLmVsZW1lbnQsIFtjb29yZHMueCwgY29vcmRzLnksIGludGVyYWN0aW9uXSlcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gcmVjdFV0aWxzLnJlc29sdmVSZWN0TGlrZSh2YWx1ZSwgaW50ZXJhY3Rpb24uaW50ZXJhY3RhYmxlLCBpbnRlcmFjdGlvbi5lbGVtZW50KVxuICB9XG59XG5cbmNvbnN0IGRlZmF1bHRzOiBSZXN0cmljdE9wdGlvbnMgPSB7XG4gIHJlc3RyaWN0aW9uOiBudWxsLFxuICBlbGVtZW50UmVjdDogbnVsbCxcbiAgb2Zmc2V0OiBudWxsLFxuICBlbmRPbmx5OiBmYWxzZSxcbn1cblxuY29uc3QgcmVzdHJpY3QgPSB7XG4gIHN0YXJ0LFxuICBzZXQsXG4gIGdldFJlc3RyaWN0aW9uUmVjdCxcbiAgZGVmYXVsdHMsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHJlc3RyaWN0XG4iXX0= |
declare const restrictRect: { | ||
start: ({ rect, startOffset, state, interaction, pageCoords }: { | ||
rect: any; | ||
startOffset: any; | ||
state: any; | ||
interaction: any; | ||
pageCoords: any; | ||
}) => void; | ||
start: ({ rect, startOffset, state, interaction, pageCoords }: import("../base").ModifierArg<import("../base").ModifierState<import("./pointer").RestrictOptions, { | ||
offset: import("../../types/types").Rect; | ||
}, any>>) => void; | ||
set: ({ coords, interaction, state }: { | ||
@@ -10,0 +6,0 @@ coords: any; |
@@ -0,10 +1,18 @@ | ||
import { ModifierArg, ModifierState } from '../base'; | ||
import { RestrictEdgesState } from './edges'; | ||
import { RestrictOptions } from './pointer'; | ||
export interface RestrictSizeOptions { | ||
min: Interact.Size | Interact.Point | RestrictOptions['restriction']; | ||
max: Interact.Size | Interact.Point | RestrictOptions['restriction']; | ||
min?: Interact.Size | Interact.Point | RestrictOptions['restriction']; | ||
max?: Interact.Size | Interact.Point | RestrictOptions['restriction']; | ||
endOnly: boolean; | ||
enabled: boolean; | ||
} | ||
declare function start(arg: any): void; | ||
declare function set(arg: any): void; | ||
declare function start(arg: ModifierArg<RestrictEdgesState>): void; | ||
export declare type RestrictSizeState = RestrictEdgesState & ModifierState<RestrictSizeOptions & { | ||
inner: Interact.Rect; | ||
outer: Interact.Rect; | ||
}, { | ||
min: Interact.Rect; | ||
max: Interact.Rect; | ||
}>; | ||
declare function set(arg: ModifierArg<RestrictSizeState>): void; | ||
declare const restrictSize: { | ||
@@ -11,0 +19,0 @@ start: typeof start; |
@@ -12,3 +12,3 @@ import extend from '@interactjs/utils/extend'; | ||
const { options } = state; | ||
const edges = interaction.prepared.linkedEdges || interaction.prepared.edges; | ||
const edges = interaction.prepared._linkedEdges || interaction.prepared.edges; | ||
if (!edges) { | ||
@@ -21,3 +21,2 @@ return; | ||
state.options = { | ||
enabled: options.enabled, | ||
endOnly: options.endOnly, | ||
@@ -50,3 +49,2 @@ inner: extend({}, restrictEdges.noInner), | ||
endOnly: false, | ||
enabled: false, | ||
}; | ||
@@ -59,2 +57,2 @@ const restrictSize = { | ||
export default restrictSize; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2l6ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFB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VjdC5yaWdodCAtIG1heFNpemUud2lkdGhcbiAgfVxuICBlbHNlIGlmIChlZGdlcy5yaWdodCkge1xuICAgIHN0YXRlLm9wdGlvbnMuaW5uZXIucmlnaHQgPSByZWN0LmxlZnQgKyBtaW5TaXplLndpZHRoXG4gICAgc3RhdGUub3B0aW9ucy5vdXRlci5yaWdodCA9IHJlY3QubGVmdCArIG1heFNpemUud2lkdGhcbiAgfVxuXG4gIHJlc3RyaWN0RWRnZXMuc2V0KGFyZylcblxuICBzdGF0ZS5vcHRpb25zID0gb3B0aW9uc1xufVxuXG5jb25zdCBkZWZhdWx0czogUmVzdHJpY3RTaXplT3B0aW9ucyA9IHtcbiAgbWluOiBudWxsLFxuICBtYXg6IG51bGwsXG4gIGVuZE9ubHk6IGZhbHNlLFxufVxuXG5jb25zdCByZXN0cmljdFNpemUgPSB7XG4gIHN0YXJ0LFxuICBzZXQsXG4gIGRlZmF1bHRzLFxufVxuXG5leHBvcnQgZGVmYXVsdCByZXN0cmljdFNpemVcbiJdfQ== |
@@ -28,3 +28,5 @@ /** | ||
*/ | ||
declare function start(arg: any): any; | ||
import { ModifierArg } from '../base'; | ||
import { SnapState } from './pointer'; | ||
declare function start(arg: ModifierArg<SnapState>): any; | ||
declare function set(arg: any): void; | ||
@@ -34,4 +36,4 @@ declare const snapEdges: { | ||
set: typeof set; | ||
defaults: Pick<import("./pointer").SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">; | ||
defaults: Pick<import("./pointer").SnapOptions, "offset" | "endOnly" | "targets" | "range">; | ||
}; | ||
export default snapEdges; |
@@ -52,2 +52,2 @@ /** | ||
export default snapEdges; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRnZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlZGdlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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biAgXVxuXG4gIHJldHVybiBzbmFwU2l6ZS5zdGFydChhcmcpXG59XG5cbmZ1bmN0aW9uIHNldCAoYXJnKSB7XG4gIHJldHVybiBzbmFwU2l6ZS5zZXQoYXJnKVxufVxuXG5jb25zdCBzbmFwRWRnZXMgPSB7XG4gIHN0YXJ0LFxuICBzZXQsXG4gIGRlZmF1bHRzOiBleHRlbmQoY2xvbmUoc25hcFNpemUuZGVmYXVsdHMpIGFzIFNuYXBTaXplT3B0aW9ucywge1xuICAgIG9mZnNldDogeyB4OiAwLCB5OiAwIH0sXG4gIH0gYXMgdW5rbm93biksXG59XG5cbmV4cG9ydCBkZWZhdWx0IHNuYXBFZGdlc1xuIl19 |
@@ -0,1 +1,2 @@ | ||
import { ModifierArg, ModifierState } from '../base'; | ||
export interface SnapPosition { | ||
@@ -13,8 +14,16 @@ x: number; | ||
offset: Interact.Point | Interact.RectResolvable<[Interact.Interaction]> | 'startCoords'; | ||
offsetWithOrigin: boolean; | ||
endOnly: boolean; | ||
enabled: boolean; | ||
offsetWithOrigin?: boolean; | ||
origin: Interact.RectResolvable<[Element]> | Interact.Point; | ||
endOnly?: boolean; | ||
} | ||
declare function start(arg: Interact.SignalArg): void; | ||
declare function set(arg: Interact.SignalArg): void; | ||
export declare type SnapState = ModifierState<SnapOptions, { | ||
offsets?: Interact.Point[]; | ||
realX?: number; | ||
realY?: number; | ||
range?: number; | ||
closest?: any; | ||
targetFields?: string[][]; | ||
}>; | ||
declare function start(arg: ModifierArg<SnapState>): void; | ||
declare function set(arg: ModifierArg<SnapState>): void; | ||
declare const snap: { | ||
@@ -21,0 +30,0 @@ start: typeof start; |
@@ -123,3 +123,3 @@ import * as utils from '@interactjs/utils'; | ||
function getOrigin(arg) { | ||
const optionsOrigin = utils.rect.rectToXY(utils.rect.resolveRectLike(arg.state.options.origin)); | ||
const optionsOrigin = utils.rect.rectToXY(utils.rect.resolveRectLike(arg.state.options.origin, [arg.interaction.element])); | ||
const origin = optionsOrigin || utils.getOriginXY(arg.interactable, arg.interaction.element, arg.interaction.prepared.name); | ||
@@ -133,5 +133,5 @@ return origin; | ||
offsetWithOrigin: true, | ||
origin: null, | ||
relativePoints: null, | ||
endOnly: false, | ||
enabled: false, | ||
}; | ||
@@ -144,2 +144,2 @@ const snap = { | ||
export default snap; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9pbnRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBvaW50ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxtQkFBbUIsQ0FBQTtBQTZCMUMsU0FBUyxLQUFLLENBQUUsR0FBdUI7SUFDckMsTUFBTSxFQUFFLFdBQVcsRUFBRSxZQUFZLEVBQUUsT0FBTyxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsV0FBVyxFQUFFLEdBQUcsR0FBRyxDQUFBO0lBQzVFLE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxLQUFLLENBQUE7SUFDekIsTUFBTSxPQUFPLEdBQUcsRUFBRSxDQUFBO0lBQ2xCLE1BQU0sTUFBTSxHQUFHLE9BQU8sQ0FBQyxnQkFBZ0I7UUFDckMsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUM7UUFDaEIsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUE7SUFFbEIsSUFBSSxVQUFVLENBQUE7SUFFZCxJQUFJLE9BQU8sQ0FBQyxNQUFNLEtBQUssYUFBYSxFQUFFO1FBQ3BDLFVBQVUsR0FBRztZQUNYLENBQUMsRUFBRSxXQUFXLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztZQUNsQyxDQUFDLEVBQUUsV0FBVyxDQUFDLE1BQU0sQ0FBQyxLQU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xuICAgIGFyZy5pbnRlcmFjdGlvbi5lbGVtZW50LFxuICAgIGFyZy5pbnRlcmFjdGlvbi5wcmVwYXJlZC5uYW1lLFxuICApXG5cbiAgcmV0dXJuIG9yaWdpblxufVxuXG5jb25zdCBkZWZhdWx0czogU25hcE9wdGlvbnMgPSB7XG4gIHJhbmdlICA6IEluZmluaXR5LFxuICB0YXJnZXRzOiBudWxsLFxuICBvZmZzZXQ6IG51bGwsXG4gIG9mZnNldFdpdGhPcmlnaW46IHRydWUsXG4gIG9yaWdpbjogbnVsbCxcbiAgcmVsYXRpdmVQb2ludHM6IG51bGwsXG4gIGVuZE9ubHk6IGZhbHNlLFxufVxuY29uc3Qgc25hcCA9IHtcbiAgc3RhcnQsXG4gIHNldCxcbiAgZGVmYXVsdHMsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHNuYXBcbiJdfQ== |
@@ -1,4 +0,5 @@ | ||
import { SnapOptions } from './pointer'; | ||
export declare type SnapSizeOptions = Pick<SnapOptions, 'targets' | 'offset' | 'endOnly' | 'enabled' | 'range'>; | ||
declare function start(arg: any): any; | ||
import { ModifierArg } from '../base'; | ||
import { SnapOptions, SnapState } from './pointer'; | ||
export declare type SnapSizeOptions = Pick<SnapOptions, 'targets' | 'offset' | 'endOnly' | 'range'>; | ||
declare function start(arg: ModifierArg<SnapState>): any; | ||
declare function set(arg: any): void; | ||
@@ -8,4 +9,4 @@ declare const snapSize: { | ||
set: typeof set; | ||
defaults: Pick<SnapOptions, "enabled" | "offset" | "endOnly" | "targets" | "range">; | ||
defaults: Pick<SnapOptions, "offset" | "endOnly" | "targets" | "range">; | ||
}; | ||
export default snapSize; |
@@ -15,2 +15,3 @@ // This module allows snapping of the size of targets during resize | ||
options: { | ||
targets: null, | ||
relativePoints: [{ | ||
@@ -20,4 +21,4 @@ x: edges.left ? 0 : 1, | ||
}], | ||
offset: options.offset || 'self', | ||
origin: { x: 0, y: 0 }, | ||
offset: options.offset || 'self', | ||
range: options.range, | ||
@@ -71,3 +72,2 @@ }, | ||
endOnly: false, | ||
enabled: false, | ||
}; | ||
@@ -80,2 +80,2 @@ const snapSize = { | ||
export default snapSize; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2l6ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsbUVBQW1FO0FBQ25FLGdCQUFnQjtBQUVoQixPQUFPLE1BQU0sTUFBTSwwQkFBMEIsQ0FBQTtBQUM3QyxPQUFPLEtBQUssRUFBRSxNQUFNLHNCQUFzQixDQUFBO0FBQzFDLE9BQU8sSUFBcUIsTUFBTSxXQUFXLENBQUE7QUFPN0MsU0FBUyxLQUFLLENBQUUsR0FBRztJQUNqQixNQUFNLEVBQUUsV0FBVyxFQUFFLEtBQUssRUFBRSxHQUFHLEdBQUcsQ0FBQTtJQUNsQyxNQUFNLEVBQUUsT0FBTyxFQUFFLEdBQUcsS0FBSyxDQUFBO0lBQ3pCLE1BQU0sS0FBSyxHQUFHLFdBQVcsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFBO0lBRXhDLElBQUksQ0FBQyxLQUFLLEVBQUU7UUFBRSxPQUFPLElBQUksQ0FBQTtLQUFFO0lBRTNCLEdBQUcsQ0FBQyxLQUFLLEdBQUc7UUFDVixPQUFPLEVBQUU7WUFDUCxjQUFjLEVBQUUsQ0FBQztvQkFDZixDQUFDLEVBQUUsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO29CQUNyQixDQUFDLEVBQUUsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO2lCQUNyQixDQUFDO1lBQ0YsTUFBTSxFQUFFLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQ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uICBzbmFwLnNldChhcmcpXG5cbiAgc3RhdGUub3B0aW9ucyA9IG9wdGlvbnNcbn1cblxuY29uc3QgZGVmYXVsdHM6IFNuYXBTaXplT3B0aW9ucyA9IHtcbiAgcmFuZ2U6IEluZmluaXR5LFxuICB0YXJnZXRzOiBudWxsLFxuICBvZmZzZXQ6IG51bGwsXG4gIGVuZE9ubHk6IGZhbHNlLFxufVxuXG5jb25zdCBzbmFwU2l6ZSA9IHtcbiAgc3RhcnQsXG4gIHNldCxcbiAgZGVmYXVsdHMsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHNuYXBTaXplXG4iXX0= |
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
140883
1240