當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。