示例#1
0
        internal void Perform_Scroll(DOMPoint location, Element element, EScrollBehavior behavior = EScrollBehavior.Auto)
        {/* Docs: https://www.w3.org/TR/cssom-view-1/#perform-a-scroll */
            abort_smooth_scroll();
            if (behavior == EScrollBehavior.Auto && element != null && element.Style.ScrollBehavior == EScrollBehavior.Smooth)
            {
                if (element.Style.ScrollBehavior == EScrollBehavior.Smooth)
                {
                    scroll_to_smooth(location);
                    return;
                }
            }
            else if (behavior == EScrollBehavior.Smooth)
            {
                scroll_to_smooth(location);
                return;
            }

            scroll_to_instant(location);
        }
示例#2
0
 public ScrollOptions(EScrollBehavior behavior)
 {
     this.behavior = behavior;
 }
示例#3
0
 public ScrollToOptions(EScrollBehavior behavior, double?left = null, double?top = null) : base(behavior)
 {
     this.left = left;
     this.top  = top;
 }