Skip to content

Commit

Permalink
fix resize on macos touchpad
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Mar 6, 2024
1 parent c3eec46 commit 468cef1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/es5/dock-spawn-ts.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/js/SplitterBar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/js/SplitterBar.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dock-spawn-ts",
"version": "2.535.2",
"version": "2.535.3",
"description": "DockSpawn Typescript Version",
"license": "MIT",
"author": "jochen.kuehner@gmx.de",
Expand Down
6 changes: 3 additions & 3 deletions src/SplitterBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class SplitterBar {
previousMouseEvent: { x: number, y: number };
pointerMovedHandler: EventHandler;
pointerUpHandler: EventHandler;

private iframeEventHandlers: EventHandler[];

constructor(previousContainer: IDockContainer, nextContainer: IDockContainer, stackedVertical: boolean) {
Expand Down Expand Up @@ -48,14 +48,14 @@ export class SplitterBar {
e = e.changedTouches[0];
}
let posIf = iframe.getBoundingClientRect();
this.handleMoveEvent({ x: e.clientX + posIf.x, y: e.clientY + posIf.y });
this.handleMoveEvent({ x: parseInt("" + e.clientX + posIf.x), y: parseInt("" + e.clientY + posIf.y) });
}

onPointerMoved(e: IMouseOrTouchEvent) {
if (e.changedTouches != null) {
e = e.changedTouches[0];
}
this.handleMoveEvent({ x: e.clientX, y: e.clientY });
this.handleMoveEvent({ x: parseInt("" + e.clientX), y: parseInt("" + e.clientY) });
}

handleMoveEvent(pos: { x: number, y: number }) {
Expand Down

0 comments on commit 468cef1

Please sign in to comment.