tiberiuzuld/angular-gridster2

Rotate Gridster Item

goyalnaman99 opened this issue · 3 comments

I need an option to rotate the gridster item as I use the gridster item to render images (of barcodes precisely) and then the grid is used to make a product label/sticker which I convert into a canvas and print image. I have tried to make a canva like basic editor using gridster.
To rotate the image such that it resizes to 100% width and height of the parent gridster item, i need an option to rotate the gridster item so that the drag/drop and resizing doesn't break.

@goyalnaman99 Can you post any screenshot of what you are trying to do?
I'm not sure how the gridster item can be rotated because the item can have different width and height.
Couldn't you just switch the number of rows and columns in gridster config to look like the griditems are rotated?

Screenshot 2023-03-15 at 10 21 45 AM

No I can't just switch because this barcode takes, 100% height and 100% width of parent. It won't work if I switch. If i rotate the div inside gridster item, then during resize it fails. This is because it would still take 100% of height of it's parent (gridster-item) whereas it it's height should be 100% of width of parent now, and same for width. Rotating the gridster item would be best, but see what happens on resize and drag and drop then.

Screenshot 2023-03-15 at 10 25 33 AM

nahi ho rha kya guys