當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ScrollableElement.updateOptions方法代碼示例

本文整理匯總了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);
			}
		}));
開發者ID:StateFarmIns,項目名稱:vscode,代碼行數:11,代碼來源:scrollManager.ts

示例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);
			}
		}));
開發者ID:yxbdali,項目名稱:vscode,代碼行數:11,代碼來源:scrollManager.ts

示例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;
	}
開發者ID:Chan-PH,項目名稱:vscode,代碼行數:14,代碼來源:editorScrollbar.ts

示例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;
	}
開發者ID:yuit,項目名稱:vscode,代碼行數:17,代碼來源:editorScrollbar.ts

示例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);
			}
		}));
開發者ID:Clizhuowei,項目名稱:vscode,代碼行數:6,代碼來源:scrollManager.ts


注:本文中的vs/base/browser/ui/scrollbar/scrollableElement.ScrollableElement.updateOptions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。