@egjs/flicking
Advanced tools
Comparing version 4.12.0-beta.11 to 4.12.0-beta.12
@@ -40,2 +40,8 @@ import Flicking, { FlickingEvents, FlickingOptions } from "./Flicking"; | ||
} | ||
export interface CrossFlickingChangedEvent extends ChangedEvent { | ||
sideIndex?: number; | ||
} | ||
export interface CrossFlickingWillChangeEvent extends WillChangeEvent { | ||
sideIndex?: number; | ||
} | ||
export declare class CrossFlicking extends Flicking { | ||
@@ -52,2 +58,3 @@ private _sideFlicking; | ||
get sideFlicking(): Flicking[]; | ||
get sideIndex(): number[]; | ||
get sideState(): SideState[]; | ||
@@ -76,2 +83,3 @@ get sideOptions(): CrossFlickingOptions["sideOptions"]; | ||
private _setPreviousSideIndex; | ||
private _addSideIndex; | ||
private _onHorizontalHoldStart; | ||
@@ -78,0 +86,0 @@ private _onHorizontalMove; |
{ | ||
"name": "@egjs/flicking", | ||
"version": "4.12.0-beta.11", | ||
"version": "4.12.0-beta.12", | ||
"description": "Everyday 30 million people experience. It's reliable, flexible and extendable carousel.", | ||
@@ -5,0 +5,0 @@ "main": "dist/flicking.cjs.js", |
@@ -64,2 +64,10 @@ /* | ||
export interface CrossFlickingChangedEvent extends ChangedEvent { | ||
sideIndex?: number; | ||
} | ||
export interface CrossFlickingWillChangeEvent extends WillChangeEvent { | ||
sideIndex?: number; | ||
} | ||
export class CrossFlicking extends Flicking { | ||
@@ -86,2 +94,6 @@ // Core components | ||
public get sideIndex() { | ||
return this._sideFlicking.map(i => i.index); | ||
} | ||
public get sideState() { | ||
@@ -160,2 +172,5 @@ return this._sideState; | ||
this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd); | ||
[EVENTS.CHANGED, EVENTS.WILL_CHANGE].forEach((event) => { | ||
this.on(event, this._addSideIndex); | ||
}); | ||
@@ -383,2 +398,6 @@ this._sideFlicking.forEach((flicking, mainIndex) => { | ||
private _addSideIndex = (e: ChangedEvent | WillChangeEvent): void => { | ||
(e as CrossFlickingChangedEvent | CrossFlickingWillChangeEvent).sideIndex = this._sideFlicking[e.index].index; | ||
}; | ||
private _onHorizontalHoldStart = (): void => { | ||
@@ -385,0 +404,0 @@ this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true); |
@@ -265,2 +265,6 @@ /* | ||
}>) => { | ||
if (!el) { | ||
return; | ||
} | ||
if (width != null) { | ||
@@ -267,0 +271,0 @@ if (isString(width)) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5357795
50067