Skip to content

Commit

Permalink
fix mouse scroll, fix bin, fix dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
BigTeri committed Nov 7, 2016
1 parent 4d19e01 commit 41a8fe8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/usr/bin/env node

require("../dist");
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ app.use(_express2.default.static(_path2.default.join(__dirname, "../client")));
const screen = new _screen2.default();
const mouse = new _mouse2.default(screen);
const keyboard = new _keyboard2.default();
const port = 4444;
const rootPath = "";

const httpSocket = app.listen(4444, () => {
console.log("server started");
const httpSocket = app.listen(port, () => {
console.log("server started on port ", port);
});

const io = (0, _socket2.default)(httpSocket, {
Expand Down
2 changes: 1 addition & 1 deletion dist/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Mouse {
_robotjs2.default.moveMouse(this.x, this.y);
}

scroll() {
scroll(deltaY) {
_robotjs2.default.scrollMouse(2, deltaY > 0 ? "down" : "up");
}
}
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsremote",
"version": "0.1.1",
"version": "0.1.2",
"description": "NodeJS desktop remote using HTML5 Pointerlock",
"main": "server/index.js",
"scripts": {
Expand All @@ -19,13 +19,13 @@
},
"dependencies": {
"jspm": "^0.16.47",
"robotjs": "^0.4.5",
"express": "^4.14.0",
"robotjs": "^0.4.5"
"socket.io": "^1.5.1"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-preset-es2015-node": "^6.1.1",
"socket.io": "^1.5.1"
"babel-preset-es2015-node": "^6.1.1"
},
"jspm": {
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion server/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class Mouse {
robot.moveMouse(this.x, this.y);
}

scroll() {
scroll(deltaY) {
robot.scrollMouse(2, deltaY > 0 ? "down" : "up");
}
}

0 comments on commit 41a8fe8

Please sign in to comment.