mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from master
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import * as browser from 'vs/base/browser/browser';
|
||||
import { IframeUtils } from 'vs/base/browser/iframe';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
|
||||
export interface IMouseEvent {
|
||||
readonly browserEvent: MouseEvent;
|
||||
@@ -67,8 +66,8 @@ export class StandardMouseEvent implements IMouseEvent {
|
||||
this.posy = e.pageY;
|
||||
} else {
|
||||
// Probably hit by MSGestureEvent
|
||||
this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
|
||||
this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
|
||||
this.posx = e.clientX + document.body.scrollLeft + document.documentElement!.scrollLeft;
|
||||
this.posy = e.clientY + document.body.scrollTop + document.documentElement!.scrollTop;
|
||||
}
|
||||
|
||||
// Find the position of the iframe this code is executing in relative to the iframe where the event was captured.
|
||||
@@ -114,6 +113,10 @@ export class DragMouseEvent extends StandardMouseEvent {
|
||||
|
||||
}
|
||||
|
||||
export interface IMouseWheelEvent extends MouseEvent {
|
||||
readonly wheelDelta: number;
|
||||
}
|
||||
|
||||
interface IWebKitMouseWheelEvent {
|
||||
wheelDeltaY: number;
|
||||
wheelDeltaX: number;
|
||||
@@ -126,14 +129,14 @@ interface IGeckoMouseWheelEvent {
|
||||
detail: number;
|
||||
}
|
||||
|
||||
export class StandardMouseWheelEvent {
|
||||
export class StandardWheelEvent {
|
||||
|
||||
public readonly browserEvent: MouseWheelEvent;
|
||||
public readonly browserEvent: IMouseWheelEvent | null;
|
||||
public readonly deltaY: number;
|
||||
public readonly deltaX: number;
|
||||
public readonly target: Node;
|
||||
|
||||
constructor(e: MouseWheelEvent, deltaX: number = 0, deltaY: number = 0) {
|
||||
constructor(e: IMouseWheelEvent | null, deltaX: number = 0, deltaY: number = 0) {
|
||||
|
||||
this.browserEvent = e || null;
|
||||
this.target = e ? (e.target || (<any>e).targetNode || e.srcElement) : null;
|
||||
|
||||
Reference in New Issue
Block a user