Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cytoscape/cytoscape.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.24.0
Choose a base ref
...
head repository: cytoscape/cytoscape.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.24.1
Choose a head ref
  • 5 commits
  • 11 files changed
  • 1 contributor

Commits on May 9, 2023

  1. Make built-in COSE make better use of the specified bounding box

    The COSE layout internally uses two variables in addition to the bounding box, `clientWidth` and `clientHeight`.  They are set by default to the viewport extent.  COSE uses these variables in some places in lieu of the `boundingBox`.  Here, we set the `clientWidth` and `clientHeight` to be whatever is specified as the `boundingBox` so there is no inconsistency.
    
    This makes the demo at https://jsbin.com/tuculav behave as expected, with a consistent result each time.
    
    Ref: Built-in COSE layout does not fully respect the specified bounding box when it differs from the vis. extent #3121
    maxkfranz committed May 9, 2023
    Copy the full SHA
    221502c View commit details

Commits on May 17, 2023

  1. Merge pull request #3122 from cytoscape/cose-bb-fix

    Make built-in COSE make better use of the specified bounding box
    maxkfranz authored May 17, 2023
    Copy the full SHA
    e3bf56e View commit details
  2. Copy the full SHA
    bbc0a3b View commit details
  3. Build 3.24.1

    maxkfranz committed May 17, 2023
    Copy the full SHA
    e412180 View commit details
  4. 3.24.1

    maxkfranz committed May 17, 2023
    Copy the full SHA
    4eb45af View commit details
19 changes: 10 additions & 9 deletions dist/cytoscape.cjs.js
Original file line number Diff line number Diff line change
@@ -20007,6 +20007,12 @@ var createLayoutInfo = function createLayoutInfo(cy, layout, options) {
// Shortcut
var edges = options.eles.edges();
var nodes = options.eles.nodes();
var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {
x1: 0,
y1: 0,
w: cy.width(),
h: cy.height()
});
var layoutInfo = {
isCompound: cy.hasCompoundNodes(),
layoutNodes: [],
@@ -20017,14 +20023,9 @@ var createLayoutInfo = function createLayoutInfo(cy, layout, options) {
layoutEdges: [],
edgeSize: edges.size(),
temperature: options.initialTemp,
clientWidth: cy.width(),
clientHeight: cy.width(),
boundingBox: makeBoundingBox(options.boundingBox ? options.boundingBox : {
x1: 0,
y1: 0,
w: cy.width(),
h: cy.height()
})
clientWidth: bb.w,
clientHeight: bb.h,
boundingBox: bb
};
var components = options.eles.components();
var id2cmptId = {};
@@ -31920,7 +31921,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.24.0";
var version = "3.24.1";

var cytoscape = function cytoscape(options) {
// if no options specified, use default
19 changes: 10 additions & 9 deletions dist/cytoscape.esm.js
Original file line number Diff line number Diff line change
@@ -19997,6 +19997,12 @@ var createLayoutInfo = function createLayoutInfo(cy, layout, options) {
// Shortcut
var edges = options.eles.edges();
var nodes = options.eles.nodes();
var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {
x1: 0,
y1: 0,
w: cy.width(),
h: cy.height()
});
var layoutInfo = {
isCompound: cy.hasCompoundNodes(),
layoutNodes: [],
@@ -20007,14 +20013,9 @@ var createLayoutInfo = function createLayoutInfo(cy, layout, options) {
layoutEdges: [],
edgeSize: edges.size(),
temperature: options.initialTemp,
clientWidth: cy.width(),
clientHeight: cy.width(),
boundingBox: makeBoundingBox(options.boundingBox ? options.boundingBox : {
x1: 0,
y1: 0,
w: cy.width(),
h: cy.height()
})
clientWidth: bb.w,
clientHeight: bb.h,
boundingBox: bb
};
var components = options.eles.components();
var id2cmptId = {};
@@ -31910,7 +31911,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.24.0";
var version = "3.24.1";

var cytoscape = function cytoscape(options) {
// if no options specified, use default
Loading