import { ScrollableProps, MoveableManagerInterface, MoveableGroupInterface } from "../types"; declare const _default: { name: string; canPinch: boolean; props: { readonly scrollable: BooleanConstructor; readonly scrollContainer: ObjectConstructor; readonly scrollThreshold: NumberConstructor; readonly scrollThrottleTime: NumberConstructor; readonly getScrollPosition: FunctionConstructor; }; events: { readonly onScroll: "scroll"; readonly onScrollGroup: "scrollGroup"; }; dragRelation: string; dragStart(moveable: MoveableManagerInterface, e: any): void; checkScroll(moveable: MoveableManagerInterface, e: any): true | undefined; drag(moveable: MoveableManagerInterface, e: any): true | undefined; dragEnd(moveable: MoveableManagerInterface, e: any): void; dragControlStart(moveable: MoveableManagerInterface, e: any): void; dragControl(moveable: MoveableManagerInterface, e: any): true | undefined; dragControlEnd(moveable: MoveableManagerInterface, e: any): void; dragGroupStart(moveable: MoveableGroupInterface, e: any): void; dragGroup(moveable: MoveableGroupInterface, e: any): true | undefined; dragGroupEnd(moveable: MoveableGroupInterface, e: any): void; dragGroupControlStart(moveable: MoveableGroupInterface, e: any): void; dragGroupContro(moveable: MoveableGroupInterface, e: any): true | undefined; dragGroupControEnd(moveable: MoveableGroupInterface, e: any): void; }; /** * @namespace Moveable.Scrollable * @description Whether or not target can be scrolled to the scroll container (default: false) */ export default _default; /** * Whether or not target can be scrolled to the scroll container * @name Moveable.Scrollable#scrollable * @default false * @example * import Moveable from "moveable"; * * const moveable = new Moveable(document.body, { * scrollable: true, * scrollContainer: document.body, * scrollThreshold: 100, * scrollThrottleTime: 30, * getScrollPosition: ({ scrollContainer }) => ([scrollContainer.scrollLeft, scrollContainer.scrollTop]), * }); * * moveable.scrollable = true; */ /** * The container to which scroll is applied * @name Moveable.Scrollable#scrollContainer * @default container * @example * import Moveable from "moveable"; * * const moveable = new Moveable(document.body, { * scrollable: true, * scrollContainer: document.body, * scrollThreshold: 100, * scrollThrottleTime: 30, * getScrollPosition: ({ scrollContainer }) => ([scrollContainer.scrollLeft, scrollContainer.scrollTop]), * }); */ /** * Expand the range of the scroll check area. * @name Moveable.Scrollable#scrollThreshold * @default 0 * @example * import Moveable from "moveable"; * * const moveable = new Moveable(document.body, { * scrollable: true, * scrollContainer: document.body, * scrollThreshold: 100, * scrollThrottleTime: 30, * getScrollPosition: ({ scrollContainer }) => ([scrollContainer.scrollLeft, scrollContainer.scrollTop]), * }); */ /** * Time interval that occurs when scrolling occurs when dragging is maintained * If set to 0, it does not occur. * @name Moveable.Scrollable#scrollThreshold * @default 0 * @example * import Moveable from "moveable"; * * const moveable = new Moveable(document.body, { * scrollable: true, * scrollContainer: document.body, * scrollThreshold: 100, * scrollThrottleTime: 30, * getScrollPosition: ({ scrollContainer }) => ([scrollContainer.scrollLeft, scrollContainer.scrollTop]), * }); */ /** * Sets a function to get the scroll position. * @name Moveable.Scrollable#getScrollPosition * @default container's scroll pos array * @example * import Moveable from "moveable"; * * const moveable = new Moveable(document.body, { * scrollable: true, * scrollContainer: document.body, * scrollThreshold: 100, * scrollThrottleTime: 30, * getScrollPosition: ({ scrollContainer }) => ([scrollContainer.scrollLeft, scrollContainer.scrollTop]), * }); * */ /** * When the drag cursor leaves the scrollContainer, the `scroll` event occur to scroll. * @memberof Moveable.Scrollable * @event scroll * @param {Moveable.Scrollable.OnScroll} - Parameters for the `scroll` event * @example * import Moveable from "moveable"; * * const moveable = new Moveable(document.body, { * target: document.querySelector(".target"), * }); * moveable.on("scroll", ({ scrollContainer, direction }) => { * scrollContainer.scrollLeft += direction[0] * 10; * scrollContainer.scrollTop += direction[1] * 10; * }); */ /** * When the drag cursor leaves the scrollContainer, the `scrollGroup` event occur to scroll in group. * @memberof Moveable.Scrollable * @event scrollGroup * @param {Moveable.Scrollable.OnScrollGroup} - Parameters for the `scrollGroup` event * @example * import Moveable from "moveable"; * * const moveable = new Moveable(document.body, { * target: [].slice.call(document.querySelectorAll(".target")), * }); * moveable.on("scroll", ({ scrollContainer, direction }) => { * scrollContainer.scrollLeft += direction[0] * 10; * scrollContainer.scrollTop += direction[1] * 10; * }); */