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


TypeScript viewModel.ViewEventsCollector類代碼示例

本文整理匯總了TypeScript中vs/editor/common/viewModel/viewModel.ViewEventsCollector的典型用法代碼示例。如果您正苦於以下問題:TypeScript ViewEventsCollector類的具體用法?TypeScript ViewEventsCollector怎麽用?TypeScript ViewEventsCollector使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ViewEventsCollector類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: onCursorRevealRange

	public onCursorRevealRange(eventsCollector: ViewEventsCollector, e: editorCommon.ICursorRevealRangeEvent): void {
		eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent(
			e.viewRange,
			e.verticalType,
			e.revealHorizontal,
			e.revealCursor
		));
	}
開發者ID:m-khosravi,項目名稱:vscode,代碼行數:8,代碼來源:viewModelCursors.ts

示例2: onCursorRevealRange

	public onCursorRevealRange(eventsCollector: ViewEventsCollector, e: ICursorRevealRangeEvent): void {
		// Ensure event has viewRange
		const viewRange = (
			e.viewRange
				? e.viewRange
				: this.coordinatesConverter.convertModelRangeToViewRange(e.range)
		);
		eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent(
			viewRange,
			e.verticalType,
			e.revealHorizontal
		));
	}
開發者ID:hungys,項目名稱:vscode,代碼行數:13,代碼來源:viewModelCursors.ts

示例3: onCursorPositionChanged

	public onCursorPositionChanged(eventsCollector: ViewEventsCollector, e: ICursorPositionChangedEvent): void {
		this.lastCursorPositionChangedEvent = e;

		const stopRenderingLineAfter = this.configuration.editor.viewInfo.stopRenderingLineAfter;

		let position = ViewModelCursors._toPositionThatCanBeRendered(e.viewPosition, stopRenderingLineAfter);
		let secondaryPositions: Position[] = [];
		for (let i = 0, len = e.secondaryPositions.length; i < len; i++) {
			secondaryPositions[i] = ViewModelCursors._toPositionThatCanBeRendered(e.secondaryViewPositions[i], stopRenderingLineAfter);
		}

		eventsCollector.emit(new viewEvents.ViewCursorPositionChangedEvent(position, secondaryPositions, e.isInEditableRange));
	}
開發者ID:hungys,項目名稱:vscode,代碼行數:13,代碼來源:viewModelCursors.ts

示例4: onModelDecorationsChanged

	public onModelDecorationsChanged(eventsCollector: ViewEventsCollector, e: IModelDecorationsChangedEvent): void {
		let changedDecorations = e.changedDecorations;
		for (let i = 0, len = changedDecorations.length; i < len; i++) {
			let changedDecoration = changedDecorations[i];
			let myDecoration = this._decorationsCache[changedDecoration];
			if (!myDecoration) {
				continue;
			}

			myDecoration.range = null;
		}

		let removedDecorations = e.removedDecorations;
		for (let i = 0, len = removedDecorations.length; i < len; i++) {
			let removedDecoration = removedDecorations[i];
			delete this._decorationsCache[removedDecoration];
		}

		this._clearCachedModelDecorationsResolver();
		eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());
	}
開發者ID:wangcheng678,項目名稱:vscode,代碼行數:21,代碼來源:viewModelDecorations.ts

示例5: onCursorSelectionChanged

	public onCursorSelectionChanged(eventsCollector: ViewEventsCollector, e: ICursorSelectionChangedEvent): void {
		this.lastCursorSelectionChangedEvent = e;

		eventsCollector.emit(new viewEvents.ViewCursorSelectionChangedEvent(e.viewSelection, e.secondaryViewSelections));
	}
開發者ID:hungys,項目名稱:vscode,代碼行數:5,代碼來源:viewModelCursors.ts

示例6: onLineMappingChanged

	public onLineMappingChanged(eventsCollector: ViewEventsCollector): void {
		this._decorationsCache = Object.create(null);

		this._clearCachedModelDecorationsResolver();
		eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent());
	}
開發者ID:wangcheng678,項目名稱:vscode,代碼行數:6,代碼來源:viewModelDecorations.ts

示例7: onCursorScrollRequest

	public onCursorScrollRequest(eventsCollector: ViewEventsCollector, e: CursorScrollRequest): void {
		eventsCollector.emit(new viewEvents.ViewScrollRequestEvent(e.desiredScrollTop));
	}
開發者ID:wangcheng678,項目名稱:vscode,代碼行數:3,代碼來源:viewModelCursors.ts

示例8: onCursorScrollRequest

	public onCursorScrollRequest(eventsCollector: ViewEventsCollector, e: editorCommon.ICursorScrollRequestEvent): void {
		eventsCollector.emit(new viewEvents.ViewScrollRequestEvent(e.deltaLines, e.revealCursor));
	}
開發者ID:m-khosravi,項目名稱:vscode,代碼行數:3,代碼來源:viewModelCursors.ts


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