-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The previous hack didn't work as expected for the collections and feeds groups. After a certain number of groups, the header passed behind the cards. There is still an issue on mobile: if you open the actions menu of a date group (not the first) and that you scroll up, the menu will appear behind the headers. That's however a bit less problematic. Also, I plan to change the popups behaviour by not fixing them to the screen.
- Loading branch information
1 parent
8991c21
commit dffbdd6
Showing
4 changed files
with
204 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/assets/javascripts/controllers/zindex_inverser_controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Controller } from '@hotwired/stimulus'; | ||
|
||
export default class extends Controller { | ||
static get targets () { | ||
return ['item']; | ||
} | ||
|
||
connect () { | ||
const baseZindex = 10; | ||
const zindexMax = this.itemTargets.length; | ||
this.itemTargets.forEach((item, index) => { | ||
item.style.zIndex = baseZindex + zindexMax - index; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.