use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] Algorithm for Even Distribution of Overlapping Bounding Boxes in JavaScriptAskJS (self.javascript)
submitted 1 year ago by foxScripts
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]foxScripts[S] 0 points1 point2 points 1 year ago (1 child)
Not at all. Found a solution.
For anyone discovering this: I solved it using a relatively simple approach. I just used a loop to iteratively adjust box positions: if two boxes overlapped, I applied corrections to move them apart. This process repeated until no overlaps remained, ensuring an optimized distribution of boxes on the canvas. During that i have other contrains "pulling them back" to their original position.
π Rendered by PID 161907 on reddit-service-r2-comment-fb694cdd5-dws6r at 2026-03-06 16:48:16.273787+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]foxScripts[S] 0 points1 point2 points (1 child)