Skip to content

Commit

Permalink
readded nearLeft and nearRight behavior
Browse files Browse the repository at this point in the history
77bda69 removed some important lines.
  • Loading branch information
GrylledCheez committed Sep 6, 2023
1 parent 879074c commit 042c74c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,11 @@ function checkIfNearGrid(app) {
var nearRight = isClose(mouseX, monitor.x + monitor.width) || mouseX > monitor.x + monitor.width;

var centerOfScreenH = monitor.x + Math.floor(monitor.width / 2);
var columnWidthFraction = Math.floor(colWidth / 5);
var columnWidthFraction = Math.floor(colWidth / 3);
var nearCenterH = mouseX > centerOfScreenH - (columnWidthFraction / 2) && mouseX < centerOfScreenH + (columnWidthFraction / 2);

var centerOfScreenV = monitor.y + Math.floor(monitor.height / 2);
var rowHeightFraction = Math.floor(rowHeight / 5);
var rowHeightFraction = Math.floor(rowHeight / 3);
var nearCenterV = mouseY > centerOfScreenV - (rowHeightFraction / 2) && mouseY < centerOfScreenV + (rowHeightFraction / 2);

if (ctrlPressed && superPressed && dragStart === null) {
Expand Down Expand Up @@ -970,7 +970,7 @@ function checkIfNearGrid(app) {
height: 1,
}, monitor.x, monitor.y, colWidth, rowHeight);
close = true;
} else if (ctrlPressed) {
} else if (ctrlPressed || nearLeft || nearRight) {
// If we are close to the left or right or ctrl pressed, show the preview, wherever the pointer is
showPreview({
col: c,
Expand Down

0 comments on commit 042c74c

Please sign in to comment.