All versions of this documentation

Cursor style

Different cursor styles can be used when the mouse is on the background and when it hovers nodes or edges.

Open in a new window.
          <!DOCTYPE html>
  <meta charset="utf-8">
  <script src="../build/ogma.min.js"></script>
    #graph-container { cursor: move; top: 0; bottom: 0; left: 0; right: 0; position: absolute; }
  <div id="graph-container"></div>

'use strict';

var ogma = new Ogma({
  container: 'graph-container',
  options: {
    cursor: {
      default: 'move',
      onNodeHover: 'pointer',
      onEdgeHover: 'pointer'

ogma.generate.random({nodes: 10, edges: 20}).then(function(g) {