Skip to content

Commit 3ff4434

Browse files
committed
Fixed spacing.
1 parent 630b198 commit 3ff4434

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

src/robotjs.cc

+29-29
Original file line numberDiff line numberDiff line change
@@ -244,38 +244,38 @@ NAN_METHOD(setMouseDelay)
244244
NAN_METHOD(scrollMouse)
245245
{
246246
if (info.Length() != 2)
247-
{
248-
return Nan::ThrowError("Invalid number of arguments.");
249-
}
247+
{
248+
return Nan::ThrowError("Invalid number of arguments.");
249+
}
250250
Nan::HandleScope scope;
251251

252252
//Get the values of magnitude and direction from the arguments list.
253-
int scrollMagnitude = info[0]->Int32Value();
254-
char *s;
255-
256-
Nan::Utf8String sstr(info[1]);
257-
s = *sstr;
258-
259-
MMMouseWheelDirection scrollDirection;
260-
261-
if (strcmp(s, "up") == 0)
262-
{
263-
scrollDirection = DIRECTION_UP;
264-
}
265-
else if (strcmp(s, "down") == 0)
266-
{
267-
scrollDirection = DIRECTION_DOWN;
268-
}
269-
else
270-
{
271-
return Nan::ThrowError("Invalid scroll direction specified.");
272-
}
273-
274-
scrollMouse(scrollMagnitude, scrollDirection);
275-
microsleep(mouseDelay);
276-
277-
info.GetReturnValue().Set(Nan::New(1));
278-
253+
int scrollMagnitude = info[0]->Int32Value();
254+
char *s;
255+
256+
Nan::Utf8String sstr(info[1]);
257+
s = *sstr;
258+
259+
MMMouseWheelDirection scrollDirection;
260+
261+
if (strcmp(s, "up") == 0)
262+
{
263+
scrollDirection = DIRECTION_UP;
264+
}
265+
else if (strcmp(s, "down") == 0)
266+
{
267+
scrollDirection = DIRECTION_DOWN;
268+
}
269+
else
270+
{
271+
return Nan::ThrowError("Invalid scroll direction specified.");
272+
}
273+
274+
scrollMouse(scrollMagnitude, scrollDirection);
275+
microsleep(mouseDelay);
276+
277+
info.GetReturnValue().Set(Nan::New(1));
278+
279279
int x = info[0]->Int32Value();
280280
int y = info[1]->Int32Value();
281281

0 commit comments

Comments
 (0)