src/render/browser/extend/components/neighbor/index.js
function SliderNeighbor (data) {
    this.autoPlay = false  // default value is false.
    this.interval = DEFAULT_INTERVAL
    this.direction = 'row' // 'column' is not temporarily supported.
    this.slides = []
    this.isPageShow = true
    this.isDomRendering = true
    this.currentIndex = 0

    this.neighborSpace = DEFAULT_NEIGHBOR_SPACE
    this.neighborAlpha = DEFAULT_NEIGHBOR_ALPHA
    this.neighborScale = DEFAULT_NEIGHBOR_SCALE

    // bind event 'pageshow', 'pagehide' and 'visibilitychange' on window.
    idleWhenPageDisappear(this)
    // bind event 'renderBegin' and 'renderEnd' on window.
    idleWhenDomRendering(this)

    Component.call(this, data)
  }
function SliderNeighbor (data) {
    this.autoPlay = false  // default value is false.
    this.interval = DEFAULT_INTERVAL
    this.direction = 'row' // 'column' is not temporarily supported.
    this.slides = []
    this.isPageShow = true
    this.isDomRendering = true
    this.currentIndex = 0

    this.neighborSpace = DEFAULT_NEIGHBOR_SPACE
    this.neighborAlpha = DEFAULT_NEIGHBOR_ALPHA
    this.neighborScale = DEFAULT_NEIGHBOR_SCALE

    // bind event 'pageshow', 'pagehide' and 'visibilitychange' on window.
    idleWhenPageDisappear(this)
    // bind event 'renderBegin' and 'renderEnd' on window.
    idleWhenDomRendering(this)

    Component.call(this, data)
  }
function SliderNeighbor ( data ) { this . autoPlay = false // default value is false. this . interval = DEFAULT_INTERVAL this . direction = 'row' // 'column' is not temporarily supported. this . slides = [ ] this . isPageShow = true this . isDomRendering = true this . currentIndex = 0 this . neighborSpace = DEFAULT_NEIGHBOR_SPACE this . neighborAlpha = DEFAULT_NEIGHBOR_ALPHA this . neighborScale = DEFAULT_NEIGHBOR_SCALE // bind event 'pageshow', 'pagehide' and 'visibilitychange' on window. idleWhenPageDisappear ( this ) // bind event 'renderBegin' and 'renderEnd' on window. idleWhenDomRendering ( this ) Component . call ( this , data ) }
data.attr
support slider's attributes and three
@param {number} neighbor-space 0 - 375, the exposing width of slides on both other sides.
@param {number} neighbor-alpha 0 - 1, opacity of both other sides of slides, default is 0.6.
@param {number} neighbor-scale 0 - 1, the scale of both other sides of slides, default is 0.8.
data . attr support slider s attributes and three