当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Builder.removeClass方法代码示例

本文整理汇总了TypeScript中vs/base/browser/builder.Builder.removeClass方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Builder.removeClass方法的具体用法?TypeScript Builder.removeClass怎么用?TypeScript Builder.removeClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vs/base/browser/builder.Builder的用法示例。


在下文中一共展示了Builder.removeClass方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: worked

	/**
	 * Tells the progress bar that an amount of work has been completed.
	 */
	public worked(value: number): ProgressBar {
		assert.ok(!isNaN(this.totalWork), 'Total work not set');

		value = Number(value);
		assert.ok(!isNaN(value), 'Value is not a number');
		value = Math.max(1, value);

		this.workedVal += value;
		this.workedVal = Math.min(this.totalWork, this.workedVal);

		if (this.element.hasClass(css_infinite)) {
			this.element.removeClass(css_infinite);
		}

		if (this.element.hasClass(css_done)) {
			this.element.removeClass(css_done);
		}

		if (!this.element.hasClass(css_active)) {
			this.element.addClass(css_active);
		}

		if (!this.element.hasClass(css_discrete)) {
			this.element.addClass(css_discrete);
		}

		this.bit.style.width = 100 * (this.workedVal / this.totalWork) + '%';

		return this;
	}
开发者ID:jumpinjackie,项目名称:sqlopsstudio,代码行数:33,代码来源:progressbar.ts

示例2: off

	private off(): void {
		this.bit.style.width = 'inherit';
		this.bit.style.opacity = '1';
		this.element.removeClass(css_active);
		this.element.removeClass(css_infinite);
		this.element.removeClass(css_discrete);

		this.workedVal = 0;
		this.totalWork = undefined;
	}
开发者ID:jumpinjackie,项目名称:sqlopsstudio,代码行数:10,代码来源:progressbar.ts

示例3: infinite

	/**
	 * Use this mode to indicate progress that has no total number of work units.
	 */
	public infinite(): ProgressBar {
		this.bit.style.width = '2%';
		this.bit.style.opacity = '1';

		this.element.removeClass(css_discrete);
		this.element.removeClass(css_done);
		this.element.addClass(css_active);
		this.element.addClass(css_infinite);

		return this;
	}
开发者ID:jumpinjackie,项目名称:sqlopsstudio,代码行数:14,代码来源:progressbar.ts

示例4: enabled

	public set enabled(value: boolean) {
		if (value) {
			this.$el.removeClass('disabled');
		} else {
			this.$el.addClass('disabled');
		}
	}
开发者ID:sangohan,项目名称:KodeStudio,代码行数:7,代码来源:button.ts

示例5: infinite

	/**
	 * Use this mode to indicate progress that has no total number of work units.
	 */
	public infinite(): ProgressBar {
		this.bit.style.width = '2%';
		this.bit.style.opacity = '1';

		this.element.removeClass(css_discrete);
		this.element.removeClass(css_done);
		this.element.addClass(css_active);
		this.element.addClass(css_infinite);

		if (!browser.hasCSSAnimationSupport()) {

			// Use a generated token to avoid race conditions from reentrant calls to this function
			let currentProgressToken = uuid.v4().asHex();
			this.currentProgressToken = currentProgressToken;

			this.manualInfinite(currentProgressToken);
		}

		return this;
	}
开发者ID:13572293130,项目名称:vscode,代码行数:23,代码来源:progressbar.ts

示例6: enabled

	set enabled(value: boolean) {
		if (value) {
			this.$el.removeClass('disabled');
			this.$el.attr({
				'aria-disabled': 'false',
				'tabIndex': '0'
			});
		} else {
			this.$el.addClass('disabled');
			this.$el.attr('aria-disabled', String(true));
			DOM.removeTabIndexAndUpdateFocus(this.$el.getHTMLElement());
		}
	}
开发者ID:Chan-PH,项目名称:vscode,代码行数:13,代码来源:button.ts


注:本文中的vs/base/browser/builder.Builder.removeClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。