How to use @egjs/component - 2 common examples

To help you get started, we’ve selected a few @egjs/component examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github naver / egjs-axes / test / unit / AnimationManager.spec.js View on Github external
z: {
					range: [-100, 200],
					bounce: [50, 0],
					circular: true/*[true, true]*/
				}
			};
			this.options = {
				easing: function easeOutCubic(x) {
					return 1 - Math.pow(1 - x, 3);
				},
				interruptable: true,
				deceleration: 0.0001,
				minimumDuration: 0,
				maximumDuration: 2000
			};
			this.component = new Component();
			var axm = new AxisManager(this.axis, this.options);
			var em = new EventManager(this.component);
			this.inst = new AnimationManager({
				options: this.options,
				itm: new InterruptManager(this.options),
				em,
				axm
			});
			em.setAnimationManager(this.inst);
		});
		afterEach(() => {
github naver / egjs-infinitegrid / src / InfiniteGrid.ts View on Github external
groups: IInfiniteGridGroup[],
		items?: IInfiniteGridItem[],
		newItems?: IInfiniteGridItem[],
		isAppend?: boolean,
		hasChildren?: boolean,
		isTrusted?: boolean,
	}) {
		this._process(PROCESSING);

		if (!groups.length) {
			return;
		}

		const renderExternal = this.options.renderExternal;
		const renderer = this._renderer;
		const callbackComponent = new Component();

		const next = () => {
			items.forEach(item => {
				item.mounted = true;
			});
			this._renderManager
				.render(callbackComponent, groups, newItems, isAppend)
				.on("renderComplete", ({ start, end }) => {
					this._setCursor(start, end);
				}).on("imageError", e => {
					/**
					 * This event is fired when an error occurs in the image.
					 * @ko 이미지 로드에 에러가 날 때 발생하는 이벤트.
					 * @event eg.InfiniteGrid#imageError
					 * @param {eg.InfiniteGrid.IErrorCallbackOptions} e The object of data to be sent to an event 이벤트에 전달되는 데이터 객체
					 * @example

@egjs/component

A base class utility that manages events and options in modules.

MIT
Latest version published 6 months ago

Package Health Score

64 / 100
Full package analysis

Popular @egjs/component functions