You don’t want the mouse pointer hanging there on the slide, where you left it, like the gross house fly.
This plugin takes care of that problem for you. After a configurable timeout (default: 1000ms), the mouse cursor will disappear, never to be heard from again until you move the mouse. Once the mouse is moved, the cursor will stay visible until the timeout is reached again.
There’s only one catch. You have to move the mouse at list once to activate this behavior. Fortunately, the chance of that happening is very likely as you’re setting up your presentation. It seems the browser does not allow the mouse cursor to be hidden unless a mouse action is initiated by the user. So just remember to give the mouse a little nudge!
View the demo online.
This repository includes a demo folder that shows this plugin in action. To view it locally, you first need to clone this repository:
$ git clone https://github.com/opendevise/bespoke-cursor && cd bespoke-cursor
Next, install the dependencies inside the project folder using npm:
$ npm install
Finally, visit the file demo/index.html in your browser to see the plugin in action.
Download the production mode version or the development mode version, or use a package manager.
This plugin is shipped in a UMD format, meaning it is available as a CommonJS/AMD module or as a browser global.
For example, when using CommonJS modules:
var bespoke = require('bespoke'),
cursor = require('bespoke-cursor');
bespoke.from('.deck', [
cursor()
]);
When using a browser global:
bespoke.from('.deck', [
bespoke.plugins.cursor()
]);
The following options are available when registering the bespoke-cursor plugin:
- timeout (type: integer, default: 1000)
-
The duration in milliseconds the cursor will remain visible after the last mouse movement. After this time has elapsed, the cursor will disappear.