Thursday 12 September 2019

Changing element position and dimensions within a custom grid

Simple calendar with draggable and resizable events for Ionic apps.

Why am I creating this? Because I have the need for the described functionalities only and nothing else. Therefore, adding a full-blown plugin and customizing its source code seemed like overkill for a rather simple task.

Problem #1

I am trying to set up a visually draggable/resizable 'event' using just Angular. Based on my stackblitz attempt, assuming you click on cell 2,2, the goal would be to drag the yellow selected cell within the same column 0,2 onto other rows such as 3,2, 4,2, etc... This will give the feel as if the selected cell which represents an event, can be dragged into different rows in the same column.

enter image description here

Problem #2 Another challenge here is that I want to 'expand' the selected cell if it is dragged from the bottom so that it would fill two or more cells such as dragging from 2,2 would expand the yellow selection to 2,2 until 4,2 in either direction up and down. (I will add a handle bar or something visual to attach the drag event to so that it does not conflict with the problem #1 above which is moving cell by cell by dragging.)

enter image description here

Stackblitz

https://stackblitz.com/edit/ionic-duqtze?file=pages%2Fhome%2Fhome.html



from Changing element position and dimensions within a custom grid

No comments:

Post a Comment