Please enable JavaScript.
Coggle requires JavaScript to display documents.
float-start option, scroll, float-end option, slotOutOfViewMethod,…
float-start option
immediately
馬上開始,預設行為
scroll
取代目前 enableFloatAfterPageScroll,page scroll 才開始 float
viewed
取代 options.lazyLoad,版位第一次進入畫面後才開始 float
timeout
timeout 完才開始 float
scroll
_onPageScroll()
this.#localState.scrollY = window.scrollY
_setup ()
this._onPageScroll
float-end option
none
預設行為
closeButton
取代 float-nonintrusive,點擊 closeButton 就不再 float
timeout
取代 float-limited,timeout 完就不再 float
slotOutOfViewMethod
FloatDirector
_floo.setting.options.slotOutOfViewMethod
_floatTypeSetting
this._toInternalFloatType()
switch case
_toInternalState ()
三種FloatType的物件
floatType
this.#localState.floatType
_toInternalState ()
是否皆為獨立事件?
個別選項的行為?
對應code的位置
float-nonintrusive
float-limited
如何建立Option?
scroll
lazyload (放在player.js)
timeout/ _unfloatButtonTimeout
哪些情況需要建立internalstate?
slot 給定的options
定義每個floatType對應的行為
(2)新增FloatType
(1)建立float start options
(3)建立toInternalFloatType()
(4)_toInternalState ()
throttle(this._onPageScroll.bind(this), 100)