iVis-at-Bilkent / cytoscape.js-edge-editing

A Cytoscape.js extension enabling interactive editing of edge anchor (bend or control) points
MIT License
42 stars 24 forks source link

Edge not Bending #72

Closed karchjd closed 8 months ago

karchjd commented 1 year ago

I can load the extention and all the menu and control points appear but nothing else seems to work. When I click on add a control point for example nothing works. I get a control point by dragging and can move it but when I move it, it does have not effect on the edge. See edge_not_bending

I pretty much load the extention like in the demo (at least I tried; see below). Note that I use the svelte framework. Any help would be greatly appreciated!

<script>
  import cytoscape from "cytoscape";
  import Konva from "konva";
  import edgeEditing from "cytoscape-edge-editing";
  edgeEditing(cytoscape, window.$, Konva);

  import { cyStore } from "../stores.js";
  import { get } from "svelte/store";
  import { onMount } from "svelte";

  let cy = get(cyStore);

  onMount(() => {
    // Initialize the Cytoscape instance
    cy.edgeEditing({
      undoable: false,
      bendRemovalSensitivity: 16,
      enableMultipleAnchorRemovalOption: true,
      initAnchorsAutomatically: false,
      useTrailingDividersAfterContextMenuOptions: true,
      enableCreateAnchorOnDrag: true,
    });

    cy.style().update();
  });
</script>
karchjd commented 8 months ago

can be closed