Merge pull request #894 from thecodingmachine/topVerticalMode

FIX: in vertical mode, the coWebSite now open from the top
This commit is contained in:
Kharhamel
2021-04-13 15:16:06 +02:00
committed by GitHub
2 changed files with 11 additions and 6 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ class CoWebsiteManager {
private resizing: boolean = false;
private cowebsiteMainDom: HTMLDivElement;
private cowebsiteAsideDom: HTMLDivElement;
get width(): number {
return this.cowebsiteDiv.clientWidth;
}
@@ -74,7 +74,7 @@ class CoWebsiteManager {
private initResizeListeners() {
const movecallback = (event:MouseEvent) => {
this.verticalMode ? this.height -= event.movementY / this.getDevicePixelRatio() : this.width -= event.movementX / this.getDevicePixelRatio();
this.verticalMode ? this.height += event.movementY / this.getDevicePixelRatio() : this.width -= event.movementX / this.getDevicePixelRatio();
this.fire();
}