DEV Community

Discussion on: Need help / suggestions on a project

Collapse
 
gac profile image
Igor Ilic

Yeah, I thought of a 2D array as well. But in that case I would need to set each view port as a grid like 5 x 20 (each block being 1x1) and then fill each block with some color if it was set to 1 or true.

But this still leaves me with wondering how to implement like drag & drop ability or creation of new block for an admin to change the layout ? As the grid wouldn't be visible to them, only the filled spaces. So they would have to try and guess where the block would be placed. Also that kind of limits the movement of the block as they would need have like a free range movement all over the grid and could take up like 1/3 of one block and 2/3 of the one next to it.

Collapse
 
joeberetta profile image
Joe Beretta

Yeah it's a problem. But for drag&drop there r many libs if u want

Thread Thread
 
gac profile image
Igor Ilic

Can you provide a link for some if you now them ? So I could take a look and maybe try and implement them.

Thread Thread
 
joeberetta profile image
Joe Beretta

Check this one: draggable