feat: enhance Comfy API handling and add tests for branded non-Z diffusion models
This commit is contained in:
@@ -44,13 +44,14 @@ export function resolveLayerDrop(options: {
|
||||
if (isDescendantLayer(sourceInfo.layer, options.target.layer.id)) return undefined;
|
||||
|
||||
const verticalRatio = Math.max(0, Math.min(1, options.verticalRatio));
|
||||
const dropIntoGroup = options.target.layer.type === "group" && verticalRatio >= 0.33 && verticalRatio <= 0.66;
|
||||
const targetLayer = options.target.layer;
|
||||
const dropIntoGroup = targetLayer.type === "group" && verticalRatio >= 0.33 && verticalRatio <= 0.66;
|
||||
if (dropIntoGroup) {
|
||||
return {
|
||||
layerId: options.sourceLayerId,
|
||||
toArtboardId: options.target.artboardId,
|
||||
toParentGroupId: options.target.layer.id,
|
||||
toIndex: options.target.layer.children.length,
|
||||
toParentGroupId: targetLayer.id,
|
||||
toIndex: targetLayer.children.length,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user