Skip to content

Commit

Permalink
Merge pull request #213 from spalmer25/ot_tip_get_the_right_document_…
Browse files Browse the repository at this point in the history
…width

[ot-tip] Use document client width instead of window inner width
  • Loading branch information
vouillon authored Sep 16, 2021
2 parents 32f5489 + 09d8dc1 commit 9148587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "ocsigen-toolkit"
version: "2.13.0"
version: "3.0.1"
maintainer: "[email protected]"
synopsis: "Reusable UI components for Eliom applications (client only, or client-server)"
description: "The Ocsigen Toolkit is a set of user interface widgets that facilitate the development of Eliom applications."
Expand Down
6 changes: 1 addition & 5 deletions src/widgets/ot_tip.eliom
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ let%client display ?(container_a = [a_class ["ot-tip-container"]])
@@ Js.Optdef.get Dom_html.window##.innerHeight
@@ fun () -> Dom_html.document##.documentElement##.clientHeight
in
let d_width =
float
@@ Js.Optdef.get Dom_html.window##.innerWidth
@@ fun () -> Dom_html.document##.documentElement##.clientWidth
in
let d_width = float Dom_html.document##.documentElement##.clientWidth in
let o_bounds = origin##getBoundingClientRect in
let o_left = o_bounds##.left in
let o_right = o_bounds##.right in
Expand Down

0 comments on commit 9148587

Please sign in to comment.