npm run format

This commit is contained in:
2025-11-18 20:12:32 +01:00
parent 404ca9ce88
commit 5c33e77595
6 changed files with 36 additions and 60 deletions

View File

@@ -125,7 +125,12 @@
// Initialize composables
const canvas2D = useCanvas2D(canvasRef);
const { zoom, increase: zoomIn, decrease: zoomOut, reset: resetZoom } = useZoom({
const {
zoom,
increase: zoomIn,
decrease: zoomOut,
reset: resetZoom,
} = useZoom({
min: 0.5,
max: 3,
step: 0.25,
@@ -160,8 +165,8 @@
const { isDragOver, handleDragOver, handleDragEnter, handleDragLeave, handleDrop } = useFileDrop({
sprites: props.sprites,
onAddSprite: (file) => emit('addSprite', file),
onAddSpriteWithResize: (file) => emit('addSpriteWithResize', file),
onAddSprite: file => emit('addSprite', file),
onAddSpriteWithResize: file => emit('addSpriteWithResize', file),
});
const showAllSprites = ref(false);
@@ -172,7 +177,6 @@
const replacingSpriteId = ref<string | null>(null);
const fileInput = ref<HTMLInputElement | null>(null);
const startDrag = (event: MouseEvent) => {
if (!canvasRef.value) return;

View File

@@ -182,30 +182,17 @@
// Initialize composables
const canvas2D = useCanvas2D(previewCanvasRef);
const { zoom, increase: increaseZoom, decrease: decreaseZoom } = useZoom({
const {
zoom,
increase: increaseZoom,
decrease: decreaseZoom,
} = useZoom({
allowedValues: [0.5, 1, 2, 3, 4, 5],
initial: 1,
});
const {
currentFrameIndex,
isPlaying,
fps,
hiddenFrames,
visibleFrames,
visibleFramesCount,
visibleFrameIndex,
visibleFrameNumber,
togglePlayback,
nextFrame,
previousFrame,
handleSliderInput,
toggleHiddenFrame,
showAllFrames,
hideAllFrames,
stopAnimation,
} = useAnimationFrames({
sprites: props.sprites,
const { currentFrameIndex, isPlaying, fps, hiddenFrames, visibleFrames, visibleFramesCount, visibleFrameIndex, visibleFrameNumber, togglePlayback, nextFrame, previousFrame, handleSliderInput, toggleHiddenFrame, showAllFrames, hideAllFrames, stopAnimation } = useAnimationFrames({
sprites: () => props.sprites,
onDraw: drawPreviewCanvas,
});
@@ -258,7 +245,6 @@
canvas2D.strokeRect(0, 0, maxWidth, maxHeight, '#e5e7eb', 1);
}
// Drag functionality
const startDrag = (event: MouseEvent) => {
if (!isDraggable.value || !previewCanvasRef.value) return;
@@ -317,7 +303,6 @@
activeSpriteId.value = null;
};
const handleTouchStart = (event: TouchEvent) => {
if (!isDraggable.value) return;
@@ -382,7 +367,6 @@
if (props.sprites.length > 0) {
drawPreviewCanvas();
}
</script>
<style scoped>