本文整理汇总了TypeScript中vs/base/browser/ui/scrollbar/scrollableElement.ScrollableElement.updateOptions方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ScrollableElement.updateOptions方法的具体用法?TypeScript ScrollableElement.updateOptions怎么用?TypeScript ScrollableElement.updateOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/base/browser/ui/scrollbar/scrollableElement.ScrollableElement
的用法示例。
在下文中一共展示了ScrollableElement.updateOptions方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this.toDispose.push(this.configuration.onDidChange((e: IConfigurationChangedEvent) => {
this.scrollbar.updateClassName(ClassNames.SCROLLABLE_ELEMENT + ' ' + this.configuration.editor.viewInfo.theme);
if (e.viewInfo.scrollbar || e.viewInfo.canUseTranslate3d) {
let newOpts: ScrollableElementChangeOptions = {
canUseTranslate3d: this.configuration.editor.viewInfo.canUseTranslate3d,
handleMouseWheel: this.configuration.editor.viewInfo.scrollbar.handleMouseWheel,
mouseWheelScrollSensitivity: this.configuration.editor.viewInfo.scrollbar.mouseWheelScrollSensitivity
};
this.scrollbar.updateOptions(newOpts);
}
}));
示例2:
this.toDispose.push(this.configuration.onDidChange((e:IConfigurationChangedEvent) => {
this.scrollbar.updateClassName(this.configuration.editor.theme);
if (e.scrollbar) {
let newOpts:ScrollableElementChangeOptions = {
canUseTranslate3d: true,
handleMouseWheel: this.configuration.editor.scrollbar.handleMouseWheel,
mouseWheelScrollSensitivity: this.configuration.editor.scrollbar.mouseWheelScrollSensitivity
};
this.scrollbar.updateOptions(newOpts);
}
}));
示例3: onConfigurationChanged
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
if (e.viewInfo) {
const editor = this._context.configuration.editor;
let newOpts: ScrollableElementChangeOptions = {
handleMouseWheel: editor.viewInfo.scrollbar.handleMouseWheel,
mouseWheelScrollSensitivity: editor.viewInfo.scrollbar.mouseWheelScrollSensitivity
};
this.scrollbar.updateOptions(newOpts);
}
if (e.layoutInfo) {
this._setLayout();
}
return true;
}
示例4: onConfigurationChanged
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
const viewInfo = this._context.configuration.editor.viewInfo;
this.scrollbar.updateClassName(ClassNames.SCROLLABLE_ELEMENT + ' ' + viewInfo.theme);
if (e.viewInfo.scrollbar || e.viewInfo.canUseTranslate3d) {
let newOpts: ScrollableElementChangeOptions = {
canUseTranslate3d: viewInfo.canUseTranslate3d,
handleMouseWheel: viewInfo.scrollbar.handleMouseWheel,
mouseWheelScrollSensitivity: viewInfo.scrollbar.mouseWheelScrollSensitivity
};
this.scrollbar.updateOptions(newOpts);
}
if (e.layoutInfo) {
this._setLayout();
}
return true;
}
示例5:
this.toDispose.push(this.configuration.onDidChange((e:IConfigurationChangedEvent) => {
this.scrollbar.updateClassName(this.configuration.editor.theme);
if (e.scrollbar) {
this.scrollbar.updateOptions(this.configuration.editor.scrollbar);
}
}));