 (defn- get-offset-position [node offset]
   (cond
     (number? offset)  offset
-    (string? offset)  (as-percentage (.innerHeight node) offset)
+    (string? offset)  (as-percentage (.-clientHeight node) offset)
     (fn? offset)      (offset node)
     :else             0))
 

       :component-did-update reset-trigger-point!

       :reagent-render
       (fn [child-el opts]
         (reset! options opts)
         child-el)}))))


  (fn [this]
    (swap! waypoints assoc-in
           [id :trigger-point]
           (get-node-position-at-offset (reagent/dom-node this) (:offset @options)))))

(defn waypoint
  ([child-el] (waypoint {} child-el))
