Archived
1
0

Move mouse wheel fix out of patch

This commit is contained in:
Asher
2019-02-01 12:32:42 -06:00
committed by Kyle Carberry
parent d677a2ee37
commit b40722869e
3 changed files with 20 additions and 29 deletions

View File

@ -6,6 +6,7 @@ import "./fill/windowsService";
import "./fill/environmentService";
import "./fill/vscodeTextmate";
import "./fill/codeEditor";
import "./fill/mouseEvent";
import { PasteAction } from "./fill/paste";
import "./fill/dom";
import "./vscode.scss";

View File

@ -0,0 +1,19 @@
import * as mouse from "vs/base/browser/mouseEvent";
/**
* Fix the wheel event for Firefox.
*/
class StandardWheelEvent extends mouse.StandardWheelEvent {
public constructor(event: mouse.IMouseWheelEvent | null) {
super(
event,
(-(event as any as MouseWheelEvent).deltaX || 0) / 3, // tslint:disable-line no-any
(-(event as any as MouseWheelEvent).deltaY || 0) / 3, // tslint:disable-line no-any
);
}
}
const target = mouse as typeof mouse;
target.StandardWheelEvent = StandardWheelEvent;