Skip to content

Commit

Permalink
fix: fix TargetList
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Dec 22, 2022
1 parent 867a617 commit 008116c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/helper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moveable/helper",
"version": "0.1.0",
"version": "0.1.1",
"description": "Helper for demo of Moveable",
"main": "./dist/helper.cjs.js",
"module": "./dist/helper.esm.js",
Expand Down
13 changes: 7 additions & 6 deletions packages/helper/src/GroupManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ export function toTargetList(raw: GroupChild[]): TargetList {

return arr;
}
function flatten() {
return deepFlat(targets(raw));
}

return {
raw: () => raw,
targets: () => targets(raw),
flatten,

targets() {
return targets(this.raw());
},
flatten() {
return deepFlat(this.targets());
},
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react-moveable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@daybrush/builder": "^0.1.0",
"@daybrush/tester": "^0.1.3",
"@egjs/build-helper": "^0.1.2",
"@moveable/helper": "~0.1.0",
"@moveable/helper": "~0.1.1",
"@scena/react-guides": "^0.17.1",
"@storybook/addon-actions": "6.5.10",
"@storybook/addon-controls": "6.5.10",
Expand Down

0 comments on commit 008116c

Please sign in to comment.