title: Draw icons on canvas in cytoscape.js
body: <p>I am using <code>cytoscape.js</code>. I want to draw a small delete icon next to selected nodes, but I have no idea how to draw on the canvas using the <a href="http://js.cytoscape.org/" rel="nofollow">API</a>.</p>
  
  <p>I guess I should listen for a select even</p>
  
  <pre><code>cy.on('select', '*', function (event) {
    const element = event.cyTarget;
  
    // draw icon on the canvas
  })
  </code></pre>
  
  <p>The library has many <a href="http://js.cytoscape.org/#extensions/ui-extensions" rel="nofollow">extensions</a>, so I know it is possible to draw on top of the canvas.</p>