Skip to content

Commit

Permalink
Fix multiple selection filter value detection
Browse files Browse the repository at this point in the history
  • Loading branch information
exogen committed Feb 6, 2025
1 parent 1bc5c59 commit 02afaa4
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/404.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/404/index.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/_next/static/chunks/pages/index-2e34290411a7b135.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/_next/static/chunks/pages/index-e0ef3b97b90a2e65.js

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/gallery/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/ToolsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ export default function ToolsProvider({ children }: { children: ReactNode }) {
} else if (layerMode === "BaseLayer") {
applyObjects = canvas?._objects.slice(0, 1) ?? [];
}
applyObjects = applyObjects.filter(
(object) => object instanceof fabric.Image
);
if (applyObjects.length) {
const getValue = (i: number) =>
(filterMap.get(applyObjects[i]) ?? {})[name] ?? 0;
Expand Down

0 comments on commit 02afaa4

Please sign in to comment.