mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-19 09:22:12 +00:00
sticky folders
This commit is contained in:
1 parent
8fa88680b3
commit
593b43e433
5 files changed
+48
-4
No files matched your search
@@ -0,0 +1,11 @@
|
||||
/** The height of a row of the explorer. */
|
||||
export const rowHeight = 28;
|
||||
|
||||
/**
|
||||
* The style of the row of a folder that is `depth` folders deep (0 for the open folder), to stick
|
||||
* under the rows of the folders it is in while any of its content can be seen: the rows of the
|
||||
* folders above are above it too.
|
||||
*/
|
||||
export function stickyRowStyle(depth: number): string {
|
||||
return `top: ${depth * rowHeight}px; height: ${rowHeight}px; z-index: ${Math.max(100 - depth, 1)};`;
|
||||
}
|
||||
Reference in new issue
Block a user