#107·swapy

在 Swapy 中调整属性和拖放

作者: Voltext创建于 2025年1月1日更新于 2026年2月21日

Hello, I am currently developing a feature for my NextJS application using Swapy, and I’m encountering challenges when applying the "scale" property to my container. Specifically, I would like the container to maintain a size of 1920px by 1080px while preserving proportions based on the user’s screen size. However, when I apply this property, the drag-and-drop functionality of Swapy items interprets the scale property a second time, disrupting the grid organization. I’ve attached screenshots and a snippet of code to illustrate the issue. Best regards, PS: Happy New Year to everyone! Drag item image Drag item and move with it image initial state of the grid image ` {/* Container /}

{/
Bloc A - En haut /}
A
{/
Bloc B - En bas à gauche /}
B
{/
Bloc C - En bas à droite /}
C
{/
Bloc D - Dernière ligne /}
D
{/
Bloc E - Dernière ligne /}
E
{/
Bloc F - Dernière ligne /}
F
{/
Bloc G - Dernière ligne /}
G
{/
Bloc H - Dernière ligne /}
H
{/
Bloc I - Dernière ligne /}
I
{/
Bloc J - Dernière ligne /}
J
{/
Bloc K - Dernière ligne /}
K
{/
Bloc L - Dernière ligne /}
L
{/
Bloc M - Dernière ligne /}
M
{/
Bloc N - Dernière ligne /}
N
{/
Bloc O - Dernière ligne /}
O
{/
Bloc P - Dernière ligne /}
P
{/
Bloc Q - Dernière ligne /}
Q
{/
Bloc R - Dernière ligne /}
R
{/
Bloc S - Dernière ligne /}
S
{/
Bloc T - Dernière ligne /}
T
{/
Bloc U - Dernière ligne /}
U
{/
Bloc V - Dernière ligne /}
V
{/
Bloc W - Dernière ligne /}
W
{/
Bloc X - Dernière ligne /}
X
{/
Bloc Y - Dernière ligne /}
Y
{/
Bloc Z - Dernière ligne /}
Z
{/
Bloc 0 - Dernière ligne /}
0
{/
Bloc 1 - Dernière ligne /}
1
{/
Bloc 2 - Dernière ligne /}
2
{/
Bloc 3 - Dernière ligne /}
3
{/
Bloc 4 - Dernière ligne /}
4
{/
Bloc 5 - Dernière ligne /}
5
{/
Bloc 6 - Dernière ligne /}
6
{/
Bloc 7 - Dernière ligne /}
7
{/
Bloc 8 - Dernière ligne /}
8
{/
Bloc 9 - Dernière ligne /}
9
{/
Bloc 10 - Dernière ligne /}
10
{/
Bloc 11 - Dernière ligne /}
11
{/
Bloc 12 - Dernière ligne /}
12
{/
Bloc 13 - Dernière ligne */} <div data-swapy-slot="13" className="col-start-72