Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

修复slider滑屏失效和 设置初始值的bug #355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 17, 2017

  1. Update slider.js

    1. 返回上一次更新, 还是将 触屏事件限制到 containner内部, 否则这个页面无法滑动了
    this.container.on($.touchEvents.move, $.proxy(this.touchMove, this))
        // $(document.body).on($.touchEvents.move, $.proxy(this.touchMove, this)) // move even outside container
    
    2. 当slider有初始化值, 比如30% 的时候, 我尝试设置weui-slider__track 和 weui-slider__handler 还有weui-slider-box__value, 然后发现bug发生在 : this.left = parseInt(this.container.find('.weui-slider__handler').css('left')),  css里面的值是 百分比, left 没有乘以width 导致异常, 修改为:
    var per = parseInt(this.container.find('.weui-slider__handler').css('left') ) 
    this.left = this.width * per /100;
    shoaly authored Jan 17, 2017
    Configuration menu
    Copy the full SHA
    76568a8 View commit details
    Browse the repository at this point in the history