Skip to content

The layout silently fails to run in Firefox #51

Description

@tntmarket

I have an application that works in Chrome, but when I run it in Firefox, layout.run() fails without any error message:

const layout = cy.layout({ name: 'cola' })
console.log('This line is hit')
layout.run()
console.log('But this line is not!')

cy.json() just before calling layout.run() looks like this:

{
  "elements": {
    "nodes": [
      {
        "data": {
          "id": "Foo"
        },
        "position": {
          "x": 0,
          "y": 0
        },
        "group": "nodes",
        "removed": false,
        "selected": true,
        "selectable": true,
        "locked": false,
        "grabbable": true,
        "pannable": false,
        "classes": ""
      }
    ]
  },
  "style": [
    {
      "selector": "node",
      "style": {
        "shape": "roundrectangle",
        "background-color": "rgb(153,153,153)"
      }
    },
    {
      "selector": "edge",
      "style": {
        "line-color": "rgb(153,153,153)",
        "target-arrow-color": "rgb(153,153,153)",
        "source-arrow-color": "rgb(153,153,153)",
        "curve-style": "bezier",
        "target-arrow-shape": "triangle"
      }
    },
    {
      "selector": ":selected",
      "style": {
        "background-color": "rgb(22,103,211)",
        "line-color": "rgb(22,103,211)",
        "target-arrow-color": "rgb(22,103,211)",
        "source-arrow-color": "rgb(22,103,211)"
      }
    }
  ],
  "data": {},
  "zoomingEnabled": true,
  "userZoomingEnabled": true,
  "zoom": 1,
  "minZoom": 0.2,
  "maxZoom": 1,
  "panningEnabled": true,
  "userPanningEnabled": true,
  "pan": {
    "x": 0,
    "y": 0
  },
  "boxSelectionEnabled": true,
  "renderer": {
    "name": "canvas"
  }
}

When I use the null or cose layouts, the layout does run.

I'm using cytoscape@3.16.1 and cytoscape-cola@2.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions