Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Fix issue with main div id
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Jun 1, 2023
1 parent 79f8019 commit 8411e39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Aardvark.UI.Screenshotr/View.fs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ module ScreenshotrView =
"if(aardvark.electron) {"

"function makeVisible() {"
" document.getElementById(\"mainScreenshotrDiv\").style.display = \"inline\";"
" document.getElementsByClassName(\"mainScreenshotrDiv\")[0].style.display = \"inline\";"
"}"

"function takeScreenshot() {"
Expand All @@ -197,7 +197,7 @@ module ScreenshotrView =
"}"

"document.getElementById('__ID__').addEventListener('click', (e) => {"
" document.getElementById(\"mainScreenshotrDiv\").style.display = \"none\";"
" document.getElementsByClassName(\"mainScreenshotrDiv\")[0].style.display = \"none\";"
" setTimeout(takeScreenshot, 500);"
" setTimeout(makeVisible, 1000);"
"})"
Expand Down Expand Up @@ -237,7 +237,7 @@ module ScreenshotrView =
/// only show UI when it should be visible and determine if
/// the credentials or the screenshot settings UI is shown
let screenshotrUI (m: AdaptiveScreenshotrModel) =
Incremental.div (AttributeMap.ofList [ attribute "id" "mainScreenshotrDiv"; style "position: absolute; top: 5%; left: 10%; width: 50%" ]) (
Incremental.div (AttributeMap.ofList [ clazz "mainScreenshotrDiv"; style "position: absolute; top: 5%; left: 10%; width: 50%" ]) (
alist {
let! withoutIsVisible = m.withoutUiIsVisible
let! withIsVisible = m.withUiIsVisible
Expand Down

0 comments on commit 8411e39

Please sign in to comment.