本文整理匯總了TypeScript中vs/base/browser/builder.Builder.hasClass方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Builder.hasClass方法的具體用法?TypeScript Builder.hasClass怎麽用?TypeScript Builder.hasClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vs/base/browser/builder.Builder
的用法示例。
在下文中一共展示了Builder.hasClass方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: doDone
private doDone(delayed: boolean): ProgressBar {
this.element.addClass(css_done);
// let it grow to 100% width and hide afterwards
if (!this.element.hasClass(css_infinite)) {
this.bit.style.width = 'inherit';
if (delayed) {
TPromise.timeout(200).then(() => this.off());
} else {
this.off();
}
}
// let it fade out and hide afterwards
else {
this.bit.style.opacity = '0';
if (delayed) {
TPromise.timeout(200).then(() => this.off());
} else {
this.off();
}
}
return this;
}
示例2: if
TPromise.timeout(50).then(() => {
// Return if another manualInfinite() call was made
if (currentProgressToken !== this.currentProgressToken) {
return;
}
// Animation done
else if (this.element.hasClass(css_done)) {
this.bit.style.display = 'none';
this.bit.style.left = '0';
}
// Wait until progress bar becomes visible
else if (this.element.isHidden()) {
animationFn();
}
// Continue Animation until done
else {
counter = (counter + 1) % 95;
this.bit.style.left = counter + '%';
animationFn();
}
});
示例3:
this.$el.on(DOM.EventType.MOUSE_OVER, (e: MouseEvent) => {
if (!this.$el.hasClass('disabled')) {
const hoverBackground = this.buttonHoverBackground ? this.buttonHoverBackground.toString() : null;
if (hoverBackground) {
this.$el.style('background-color', hoverBackground);
}
}
});
示例4: enabled
public get enabled() {
return !this.$el.hasClass('disabled');
}
示例5: label
set label(value: string) {
if (!this.$el.hasClass('monaco-text-button')) {
this.$el.addClass('monaco-text-button');
}
this.$el.text(value);
}