tech-systems / panes

🎉📱 Create dynamic modals, cards, panes for your applications in few steps. One instance – Thousands solutions. Any framework and free.
https://panejs.com
MIT License
687 stars 40 forks source link

zStack: when exist, second present, don't push elements #194

Closed bazuka5801 closed 1 year ago

bazuka5801 commented 2 years ago

I set zStack -> pushElements [ '.selector'] The first pane.present() works fine when I close the pane by swiping down, the next pane.present() works as expected. But if I close the pane by pane.hide() and then try pane.present(), zStack does not move my pushElements.

I think these linse can be helpful for fixing bug. I think in my scenario, beforePresentTransition don't called, and trasition for pushElement don't started

https://github.com/roman-rr/cupertino-pane/blob/016c4d3067688db810bc725607740e9029086333/src/modules/z-stack.ts#L41-L72

https://github.com/roman-rr/cupertino-pane/blob/4c0f7d0ed25e08b1908168f8586f1972858208c4/src/cupertino-pane.ts#L233-L256

bazuka5801 commented 2 years ago

UPD, I found the bug details. When I swipe down (I use bottomClose), it destroy pane (proof lines) https://github.com/roman-rr/cupertino-pane/blob/016c4d3067688db810bc725607740e9029086333/src/events.ts#L408-L413

When I hide the pane, it only hides from screen, not from DOM. I have a few questions: 1) Can we make zStack work when pane is presented? 2) Can we optimize DOM usage (destoying from DOM, when swiping down)

roman-rr commented 2 years ago

Hello @bazuka5801 Thank you for report. Do you refer z-stack or z-stack full demos ? What is package version ?

bazuka5801 commented 2 years ago

@roman-rr latest 1.3.0. in next few days I will show a demo

roman-rr commented 1 year ago

@bazuka5801 Closed due inactivity