From 4ebda1eb8600ef2fe5d84e649f3a45f0f12a5536 Mon Sep 17 00:00:00 2001 From: BensonLaur <1035069088@qq.com> Date: Mon, 10 May 2021 18:39:48 +0800 Subject: [PATCH] swap rotation while swapping placement --- svgnest.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/svgnest.js b/svgnest.js index 187356a..b178d49 100644 --- a/svgnest.js +++ b/svgnest.js @@ -881,6 +881,10 @@ var temp = clone.placement[i]; clone.placement[i] = clone.placement[j]; clone.placement[j] = temp; + + var tempRotation = clone.rotation[i]; + clone.rotation[i] = clone.rotation[j]; + clone.rotation[j] = tempRotation ; } }