Update API to use IViewportRange and IViewportCellPosition
This commit is contained in:
@@ -306,7 +306,7 @@ export class Linkifier implements ILinkifier {
|
||||
e => {
|
||||
this._onLinkTooltip.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));
|
||||
if (matcher.hoverTooltipCallback) {
|
||||
matcher.hoverTooltipCallback(e, uri, { startRow: y1, startColumn: x1, endRow: y2, endColumn: x2 });
|
||||
matcher.hoverTooltipCallback(e, uri, { start: { row: y1, col: x1 }, end: { row: y2, col: x2 } });
|
||||
}
|
||||
},
|
||||
() => {
|
||||
|
||||
Vendored
+9
-6
@@ -43,15 +43,18 @@ export interface IViewport extends IDisposable {
|
||||
onThemeChange(colors: IColorSet): void;
|
||||
}
|
||||
|
||||
export interface ILinkLocation {
|
||||
startColumn: number;
|
||||
startRow: number;
|
||||
endColumn: number;
|
||||
endRow: number;
|
||||
export interface IViewportRange {
|
||||
start: IViewportCellPosition;
|
||||
end: IViewportCellPosition;
|
||||
}
|
||||
|
||||
export interface IViewportCellPosition {
|
||||
col: number;
|
||||
row: number;
|
||||
}
|
||||
|
||||
export type LinkMatcherHandler = (event: MouseEvent, uri: string) => void;
|
||||
export type LinkMatcherHoverTooltipCallback = (event: MouseEvent, uri: string, position: ILinkLocation) => void;
|
||||
export type LinkMatcherHoverTooltipCallback = (event: MouseEvent, uri: string, position: IViewportRange) => void;
|
||||
export type LinkMatcherValidationCallback = (uri: string, callback: (isValid: boolean) => void) => void;
|
||||
|
||||
export interface ILinkMatcher {
|
||||
|
||||
Reference in New Issue
Block a user