feat: enhance canvas functionality with new node types and improved data handling
- Added support for a new "compare" node type to facilitate side-by-side image comparisons. - Updated AI image and prompt nodes to include aspect ratio handling for better image generation. - Enhanced canvas toolbar to include export functionality for canvas data. - Improved data resolution for compare nodes by resolving incoming edges and updating node data accordingly. - Refactored frame node to support dynamic resizing and exporting capabilities. - Introduced debounced saving for prompt node to optimize performance during user input.
This commit is contained in:
@@ -88,7 +88,20 @@ export const get = query({
|
||||
return null;
|
||||
}
|
||||
|
||||
return node;
|
||||
const data = node.data as Record<string, unknown> | undefined;
|
||||
if (!data?.storageId) {
|
||||
return node;
|
||||
}
|
||||
|
||||
const url = await ctx.storage.getUrl(data.storageId as Id<"_storage">);
|
||||
|
||||
return {
|
||||
...node,
|
||||
data: {
|
||||
...data,
|
||||
url: url ?? undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user