Skip to content

Commit

Permalink
Remove some dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberang3l committed Mar 22, 2024
1 parent 393bac1 commit d4ee12e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions contents/code/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,15 @@ function resize(workspace, action, incStepPx, minSizePx) {
var client = workspace.activeWindow;

if (client.moveable && client.resizeable) {
var geom = client.frameGeometry;
var newGeom;

var x = geom.x,
y = geom.y,
w = geom.width,
h = geom.height,
ratio = geom.width / geom.height;

if (action == "shrink") {
newGeom = calcShrink(client, incStepPx, minSizePx);
} else if (action == "grow") {
newGeom = calcGrow(client, incStepPx);
} else {
print("Please choose an action between 'shrink' and 'grow'");
return;
}

// print(client.resourceName, JSON.stringify(newGeom));
Expand All @@ -194,6 +188,7 @@ function moveWithFixedSize(workspace, moveDirection, movePx) {
y = geom.y + movePx;
} else {
print("Please choose a move direction between 'left', 'right', 'up' and 'down'");
return;
}
new_xy = ensureWithinVisibleArea(client, geom.width, geom.height, geom.width, geom.height, x, y);
reposition(client, new_xy.x, new_xy.y, geom.width, geom.height);
Expand Down

0 comments on commit d4ee12e

Please sign in to comment.