.save() method is not saving rects. #52
Replies: 6 comments 5 replies
-
The purpose of The final result of the packed rects are stored in every rects position inside packer.bins.forEach(bin => {
console.log(bin.rects);
}); This repo is just a simple packing algorithm module, so you have to find your own way storing them. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick response! sure i found my own way already but maybe this are points to improve this simple nice module? |
Beta Was this translation helpful? Give feedback.
-
The maxrects-packer/src/geom/Rectangle.ts Lines 1 to 7 in 11fd72c You can simply use |
Beta Was this translation helpful? Give feedback.
-
BTW, Let's move this post to discussions |
Beta Was this translation helpful? Give feedback.
-
For me it is not working as intended. I use
see my codesandbox example here |
Beta Was this translation helpful? Give feedback.
-
Issue #53 created |
Beta Was this translation helpful? Give feedback.
-
Hi, i run into an issue. I want to save my packer by using
packer.save()
but the rect property of my bins are empty.So i dug into the code and found that the rect prop is not filld here:
maxrects-packer/src/maxrects-packer.ts
Lines 310 to 339 in 11fd72c
To understand the problem i created a sandbox with the problem:
https://codesandbox.io/s/musing-sound-vedd2b?file=/src/index.ts
version 2.7.3
Beta Was this translation helpful? Give feedback.
All reactions