@@ -244,38 +244,38 @@ NAN_METHOD(setMouseDelay)
244
244
NAN_METHOD (scrollMouse)
245
245
{
246
246
if (info.Length () != 2 )
247
- {
248
- return Nan::ThrowError (" Invalid number of arguments." );
249
- }
247
+ {
248
+ return Nan::ThrowError (" Invalid number of arguments." );
249
+ }
250
250
Nan::HandleScope scope;
251
251
252
252
// 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
+
279
279
int x = info[0 ]->Int32Value ();
280
280
int y = info[1 ]->Int32Value ();
281
281
0 commit comments