Fixing spacing issue in kdom. (#43)

This commit is contained in:
Thomas Johnson 2017-11-26 15:20:01 -08:00
commit c9c30eaf45

View file

@ -1223,8 +1223,8 @@ proc clientWidth*(): int {.
proc inViewport*(el: Node): bool = proc inViewport*(el: Node): bool =
let rect = el.getBoundingClientRect() let rect = el.getBoundingClientRect()
result = rect.top >= 0 and rect.left >= 0 and result = rect.top >= 0 and rect.left >= 0 and
rect.bottom <= clientHeight().float and rect.bottom <= clientHeight().float and
rect.right <= clientWidth().float rect.right <= clientWidth().float
proc scrollTop*(e: Node): int {.importcpp: "#.scrollTop", nodecl.} proc scrollTop*(e: Node): int {.importcpp: "#.scrollTop", nodecl.}
proc offsetHeight*(e: Node): int {.importcpp: "#.offsetHeight", nodecl.} proc offsetHeight*(e: Node): int {.importcpp: "#.offsetHeight", nodecl.}