Iscroll

作者: 秋天de童话 | 来源:发表于2018-08-25 16:38 被阅读40次
    1. absStartX:0
    2. absStartY:-58
    3. directionLocked:0
    4. directionX:0
    5. directionY:1
    6. distX:-18.570999145507812
    7. distY:44.2860107421875
    8. enabled:true
    9. endTime:1534690677086
    10. hasHorizontalScroll:false
    11. hasVerticalScroll:true
    12. initiated:0
    13. isInTransition:false
    14. maxScrollX:0
    15. maxScrollY:-57
    16. moved:true
    17. options:{resizeScrollbars: true, mouseWheelSpeed: 20, snapThreshold: 0.334, disablePointer: false, disableTouch: true, …}
    18. pointX:254.28599548339844
    19. pointY:227.14300537109375
    20. resizeTimeout:6
    21. scroller:div.child
    22. scrollerHeight:357
    23. scrollerStyle:CSSStyleDeclaration {0: "transition-timing-function", 1: "transition-duration", 2: "transform", alignContent: "", alignItems: "", alignSelf: "", alignmentBaseline: "", all: "", …}
    24. scrollerWidth:400
    25. startTime:1534690676862
    26. startX:0
    27. startY:-2.9050140380859517
    28. translateZ:" translateZ(0)"
    29. wrapper:div.parent
    30. wrapperHeight:300
    31. wrapperOffset:{left: -8, top: -8}
    32. wrapperWidth:400
    33. x:0
    34. y:-12
    35. _events:{}
    36. proto:Object

    option::

    1. HWCompositing:true
    2. bindToWrapper:false
    3. bounce:true
    4. bounceEasing:{style: "cubic-bezier(0.1, 0.57, 0.1, 1)", fn: ƒ}
    5. bounceTime:600
    6. directionLockThreshold:5
    7. disableMouse:true
    8. disablePointer:false
    9. disableTouch:true
    10. eventPassthrough:undefined
    11. freeScroll:true
    12. invertWheelDirection:1
    13. momentum:true
    14. mouseWheelSpeed:20
    15. preventDefault:true
    16. preventDefaultException:{tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/}
    17. resizePolling:60
    18. resizeScrollbars:true
    19. scrollX:true
    20. scrollY:true
    21. snapThreshold:0.334
    22. startX:0
    23. startY:0
    24. useTransform:true
    25. useTransition:true

    propetype 探测 -- 拖拽

    iscroll事件

    https://iiunknown.gitbooks.io/iscroll-5-api-cn/content/customevents.html

    • beforeScrollStart,在用户触摸屏幕但还没有开始滚动时触发。
    • scrollCancel,滚动初始化完成,但没有执行。
    • scrollStart,开始滚动
    • scroll,内容滚动时触发,只有在scroll-probe.js版本中有效,请参考onScroll event
    • scrollEnd,停止滚动时触发。
    • flick,用户打开左/右。
    • zoomStart,开始缩放。
    • zoomEnd,缩放结束。

    栗子
    myScroll = new IScroll('#wrapper');
    myScroll.on('scrollEnd', doSomething);

    相关文章

      网友评论

          本文标题:Iscroll

          本文链接:https://www.haomeiwen.com/subject/swihiftx.html