Skip to content

Commit

Permalink
fix: add dragFcousedInput prop
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed May 1, 2023
1 parent ad8b962 commit e96f9fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-moveable/src/ables/Default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default {
"useResizeObserver",
"useMutationObserver",
"zoom",
"dragFocusedInput",
"transformOrigin",
"edge",
"ables",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ export const SnapMaxiumDistance = add("Set maximum distance for guidelines", {
export const SnapElementsGroup = add("Snap Elements (group)", {
app: require("./ReactSnapElementsGroupApp").default,
path: require.resolve("./ReactSnapElementsGroupApp"),
play: async ({ canvasElement }) => {
await wait();
const moveable = canvasElement.querySelector<HTMLElement>(".moveable-control-box")!;
const target = canvasElement.querySelector<HTMLElement>(".moveable-area")!;

await pan({
target,
start: [0, 0],
end: [-118, -118],
duration: 20,
interval: 10,
});
expect(moveable.style.transform).toBe("translate3d(-1px, -1px, 0px)");
},
});


Expand Down

0 comments on commit e96f9fc

Please sign in to comment.