Skip to content

Commit ceae46a

Browse files
committed
adding functionality to get window top-bar bounding in js
1 parent a761b15 commit ceae46a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

fastn-de.fifthtry.site/index.ftd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ $on-click$: $get-window-position()
6060
js: $assets.files.js.components.js
6161
-- end: bottom-bar
6262

63-
-- void get-window-position:
63+
-- void get-window-position():
6464
js: $assets.files.js.functions.js
6565

6666
getWindowPosition()
67-
68-
-- end: get-window-position
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
(function () {
22
function getWindowPosition() {
3-
console.log("getWindowPosition called")
4-
}
5-
window.functions = {
6-
getWindowPosition
3+
window.document.querySelectorAll(".top-bar").forEach(topBar => {
4+
console.log(topBar.getBoundingClientRect())
5+
})
76
}
7+
window.getWindowPosition = getWindowPosition;
88
}())
9+

fastn-de.fifthtry.site/ui/window.ftd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ anchor: parent
1515
background.solid: $ds.colors.background.step-1
1616
border-color: $ds.colors.border
1717
$on-click$: $ftd.increment($a = $state.z)
18+
classes: top-bar
1819

1920
-- ds.secondary-button: close
2021

0 commit comments

Comments
 (0)