Skip to content

Commit 648e11a

Browse files
committed
fix: Windows not having their forks created in the correct orientation
1 parent d5a66b0 commit 648e11a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/fork.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ export class Fork {
7373
let area: [number, number, number, number];
7474

7575
if (this.is_horizontal()) {
76-
const width = this.area.width - this.length_left + ext.gap_inner;
77-
area = [width, this.area.y, this.area.width - width, this.area.height];
76+
const xpos = this.area.x + this.length_left + ext.gap_inner
77+
const width = this.area.width - this.length_left - ext.gap_inner
78+
area = [xpos, this.area.y, width, this.area.height];
7879
} else {
79-
const height = this.area.height - this.length_left + ext.gap_inner;
80-
area = [this.area.x, height, this.area.width, this.area.height - height];
80+
const ypos = this.area.y + this.length_left + ext.gap_inner
81+
const height = this.area.height - this.length_left - ext.gap_inner;
82+
area = [this.area.x, ypos, this.area.width, height];
8183
}
8284

8385
return new Rect.Rectangle(area);

0 commit comments

Comments
 (0)