[FEAT] PNG export fix
This commit is contained in:
@@ -23,7 +23,8 @@ export const useExportLayers = (layersRef: Ref<Layer[]>, columns: Ref<number>, n
|
||||
// Otherwise, calculate from sprite dimensions across ALL layers (same as canvas)
|
||||
// This ensures export dimensions match what's shown in the canvas
|
||||
const { maxWidth, maxHeight } = getMaxDimensionsAcrossLayers(layersRef.value);
|
||||
const allSprites = getVisibleLayers().flatMap(l => l.sprites);
|
||||
// Calculate negative spacing from ALL layers (not just visible) to keep canvas size stable
|
||||
const allSprites = layersRef.value.flatMap(l => l.sprites);
|
||||
const negativeSpacing = calculateNegativeSpacing(allSprites, negativeSpacingEnabled.value);
|
||||
return {
|
||||
cellWidth: maxWidth + negativeSpacing,
|
||||
|
||||
Reference in New Issue
Block a user