月槻ツキ
月槻ツキ

Reputation: 11

How to prevent the graph from reacting when the zoom button on a graph is pressed in cytoscape.js

I use Cytoscape.js.
The graph is mounted in a div with the id of mynetwork.
I've placed a button on top of that graph that allows you to zoom in.
When you push the zoom button, the node hidden under the button responds to your click.
Is there any way to disable this reaction?

Upvotes: 0

Views: 128

Answers (1)

月槻ツキ
月槻ツキ

Reputation: 11

Self resolved.
I was able to get around this issue by not creating a button in the div that I was mounting, as shown below.

<div id="relationMap">
  <div id="mynetwork">
    <button>+</button>
  </div>
</div>

<div id="relationMap">
  <div id="mynetwork"></div>
  <button>+</button>
</div>

Upvotes: 1

Related Questions