Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public mounted() {
this.$_pluginsDiffer = new ListDiffer();
this.$_cloneCount = 0;
const options = {...this.options, ...{ renderExternal: true }};
this.$_nativeFlicking = new NativeFlicking(
this.$el as HTMLElement,
{
...options,
framework: "vue",
frameworkVersion: Vue.version,
} as object,
);
const slots = this.$_getSlots();
this.$_slotDiffer = new ListDiffer(slots, vnode => vnode.key!);
this.$_bindEvents();
this.$_checkUpdate();
if (this.options.renderOnlyVisible) {
// Should update once to update visibles
ngAfterViewInit() {
if (!this.flicking) {
this.flicking = new NativeFlicking(
this.elRef.nativeElement.children[0],
{
...this.options,
framework: 'angular',
frameworkVersion: VERSION.full,
} as object,
);
this.userPanelDataDiffer = new ListDiffer(this.panels);
this.syncPanelDataIfRenderOnlyVisible(this.panels);
this.bindEvents();
this.checkPlugins();
setTimeout(() => {
public componentDidMount() {
const options = {};
const props = this.props;
for (const name in props) {
if (flickingOptions.indexOf(name as keyof IFlickingOptions) !== -1) {
options[name] = props[name];
}
}
this.flicking = new NativeFlicking(ReactDOM.findDOMNode(this) as HTMLElement, options);
const flicking = this.flicking;
flicking.on("flick", (e) => {
this.props.onFlick(e);
});
flicking.on("flickEnd", (e) => {
this.props.onFlickEnd(e);
});
flicking.on("beforeFlickStart", (e) => {
this.props.onBeforeFlickStart(e);
});
flicking.on("beforeRestore", (e) => {
this.props.onBeforeRestore(e);
});
flicking.on("restore", (e) => {
public componentDidMount() {
this.flicking = new NativeFlicking(
findDOMNode(this) as HTMLElement,
{
...this.options,
framework: "react",
frameworkVersion: React.version,
} as object,
).on({
moveStart: (e: FlickingEvent) => this.props.onMoveStart!(e),
move: (e: FlickingEvent) => this.props.onMove!(e),
moveEnd: (e: FlickingEvent) => this.props.onMoveEnd!(e),
holdStart: (e: FlickingEvent) => this.props.onHoldStart!(e),
holdEnd: (e: FlickingEvent) => this.props.onHoldEnd!(e),
select: (e: FlickingEvent) => this.props.onSelect!(e),
needPanel: (e: NeedPanelEvent) => this.props.onNeedPanel!(e),
change: (e: FlickingEvent) => this.props.onChange!(e),
restore: (e: FlickingEvent) => this.props.onRestore!(e),