All Questions
11 questions
0
votes
0
answers
217
views
Tree layout algorithm for a mindmap with summary feature
I am planning to implement a mindmap with a summary feature using JavaScript. The layout should roughly look like the image attached (summary feature in Xmind.app).
However, I am not sure how to ...
2
votes
1
answer
472
views
Algorithm to take explicit heights of images and lay them out in optimally compact "Masonry"-style layout
I am using react-masonry-css to lay out some images in a Masonry-like layout, but it is just putting the same number of images in each column basically, and it ends up having large discrepancies in ...
0
votes
0
answers
48
views
How to generate random "visually pleasing" 2D matrices given a range of blocks?
I am wondering sort of how to generate random user avatar designs, sort of like how StackOverflow default user avatars are, except I would just be dealing with squares. The range is anywhere from 21 ...
0
votes
0
answers
63
views
Dividing a space in a given number of cells depending on its size
I recently started coding using P5.js and the browser editor they provide. You can find the code I'm talking about below at https://editor.p5js.org/Y_P/sketches/Xo2exzHSX
1- I'm looking for an ...
0
votes
1
answer
305
views
Calculating layout using pure JS
May I have an object represents page elements with styles:
[{
id: "widget-1",
display: "block",
float: "left",
width: 100
}, {
id: "widget-2",
display: "block",
float: "right",
...
1
vote
0
answers
1k
views
Hyperbolic / Radial Tree Layout Algorithm
I need to obtain the (x,y) coordinates for rendering a Tree data structure made up of single nodes.
I know there are some algorithms for example:
Wikipedia: Radial Tree
Wikipedia: Hyperbolic Tree
...
1
vote
1
answer
3k
views
Javascript graph layout algorithm
TL;DR
I need to set a graph's layout programmatically though JavaScript code.
Explanation
I have a graph in this format:
var graph = {
"nodes": [
{"x": 0, "y": 0},
{"x": 0, "y":...
-1
votes
1
answer
36
views
Avoiding oscillating moving in layout algorithm
Following on from this question here:
Calculate distance to move a box to remove intersection
I have a problem where moving one box causes it to overlap with another box, and the algorithm as it ...
0
votes
1
answer
1k
views
Fixed row-height, flexible width, justified image gallery
I'm working on a full page, flexible width image gallery.
https://weknowtoomuch.com/projects/nga/projects-grid
Now, you probably start to get an idea of what I'm trying to do. The page in it's ...
12
votes
3
answers
3k
views
Logic to strategically place items in a container with minimum overlapping connections
This is more of a algorithmic question. I have a page which using javaScript displays items and items relationship to other item by drawing arrow connection from source to target (think jsPlumb). Each ...
2
votes
1
answer
3k
views
Understanding and Implementing a Force based graph layout algorithm
I'm trying to implement a force base graph layout algorithm, based on http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing)
My first attempt didn't work so I looked at
http://blog....