only report on loglevel debug, explain events
This commit is contained in:
@@ -37,6 +37,9 @@ export class MockCoreMouseService implements ICoreMouseService {
|
||||
reset(): void {}
|
||||
triggerMouseEvent(event: ICoreMouseEvent): boolean { return false; }
|
||||
onProtocolChange: IEvent<CoreMouseEventType> = new EventEmitter<CoreMouseEventType>().event;
|
||||
explainEvents(events: CoreMouseEventType): {[event: string]: boolean} {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
|
||||
export class MockCoreService implements ICoreService {
|
||||
|
||||
@@ -292,6 +292,16 @@ export class CoreMouseService implements ICoreMouseService {
|
||||
return true;
|
||||
}
|
||||
|
||||
public explainEvents(events: CoreMouseEventType): {[event: string]: boolean} {
|
||||
return {
|
||||
DOWN: !!(events & CoreMouseEventType.DOWN),
|
||||
UP: !!(events & CoreMouseEventType.UP),
|
||||
DRAG: !!(events & CoreMouseEventType.DRAG),
|
||||
MOVE: !!(events & CoreMouseEventType.MOVE),
|
||||
WHEEL: !!(events & CoreMouseEventType.WHEEL)
|
||||
};
|
||||
}
|
||||
|
||||
private _compareEvents(e1: ICoreMouseEvent, e2: ICoreMouseEvent): boolean {
|
||||
if (e1.col !== e2.col) return false;
|
||||
if (e1.row !== e2.row) return false;
|
||||
|
||||
@@ -47,6 +47,11 @@ export interface ICoreMouseService {
|
||||
* Event to announce changes in mouse tracking.
|
||||
*/
|
||||
onProtocolChange: IEvent<CoreMouseEventType>;
|
||||
|
||||
/**
|
||||
* Human readable version of mouse events.
|
||||
*/
|
||||
explainEvents(events: CoreMouseEventType): {[event: string]: boolean};
|
||||
}
|
||||
|
||||
export const ICoreService = createDecorator<ICoreService>('CoreService');
|
||||
|
||||
Reference in New Issue
Block a user