Skip to content

Commit

Permalink
docs: fix container docs
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Mar 26, 2023
1 parent f3a9ee4 commit 295d905
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/react-moveable/src/MoveableManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,9 @@ export default class MoveableManager<T = {}>
}
/**
* If the width, height, left, and top of the only target change, update the shape of the moveable.
* Use `.updateRect()` method
* @method Moveable#updateTarget
* @deprecated
* @example
* import Moveable from "moveable";
*
Expand Down
12 changes: 10 additions & 2 deletions packages/react-moveable/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export interface DefaultOptions {
*/
dragTarget?: SVGElement | HTMLElement | null;
/**
* Moveable Container. Don't set it.
* @private
* A container into which Moveables are inserted.
* Set it only when used within the slot of Web Components or when the container is different.
* @default parentElement
*/
container?: SVGElement | HTMLElement | null;
Expand Down Expand Up @@ -3228,7 +3228,15 @@ export interface MoveableInterface {
getRect(): RectInfo;
getAble<T extends Able>(ableName: string): T | undefined;
isMoveableElement(target: Element): boolean;
/**
* If the location or size of the target is changed, call the `.updateRect()` method.
* Use the `useResizeObserver` and `useMutationObserver` props to update automatically.
*/
updateRect(type?: "Start" | "" | "End", isTarget?: boolean, isSetState?: boolean): void;
/**
* @deprecated
* Use `.updateRect()` method
*/
updateTarget(): void;
/**
* Request able through a method rather than an event.
Expand Down

0 comments on commit 295d905

Please sign in to comment.