Cloning IOS Moving Apps around feature.
Was looking for some resource that replicates the logic around editing the homescreen in order to move apps/widgets around
Example: I drag an item1 over another item2. Item2 gets moved down and item1 takes its place.
9 Replies
I don't have an answer for you but I do find this an interesting challenge which I might have a go at.
When you say "item2 gets moved down" do you want it to go to where item1 was or to move it along one place and shift everything after it along too?
That’s what I’m also trying to determine, I don’t know what rules to come up with in regard to the item relocation
I would have thought that swapping them would be simpler as you just have to get the origin and destination grid areas. If you have to start shifting them all it will get more complicated and probably require re-creating the whole grid (React style)
Swapping them would defenietly be easier, but in my case specifically I am working with 3 possible dimensions. 1x1 1x2 and 2x2.
The grid is 3 columns and x amount of rows dynamically expanding based on how many items.
So swapping positions is possible until you swap a smaller piece with a bigger piece, then we'd have to recreate the grid i believe
@chrisbolson do you know if its possible to do all the animations and moving using display: grid? Or should I make them all position absolute and set them
You can't animate the position within the grid. But you can fake it with the FLIP method.
David Khourshid
CSS-Tricks
Animating Layouts with the FLIP Technique | CSS-Tricks
User interfaces are most effective when they are intuitive and easily understandable to the user. Animation plays a major role in this - as Nick Babich said,
Yo someone pls help me with my drag and drop 😭 There’s like stuff going on in the back in which i can’t comprehend
ya gotta give a bit more info (and please open a new post too, that'll help whoever might search for that topic in the future)
Gotcha, its been made. I don't even know where to start besides from the architecture because my stuff is just a convoluted mess now ;-;