Skip to content

Commit

Permalink
Build 3.30.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekucera committed Oct 23, 2024
1 parent 698ae2d commit 85f3dc6
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 48 deletions.
64 changes: 50 additions & 14 deletions dist/cytoscape.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10492,10 +10492,14 @@ var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix)
}

// shift by margin and expand by outline and border
lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
var leftPad = marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
var rightPad = marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
var topPad = marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
var botPad = marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
lx1 += leftPad;
lx2 += rightPad;
ly1 += topPad;
ly2 += botPad;

// always store the unrotated label bounds separately
var bbPrefix = prefix || 'main';
Expand All @@ -10507,6 +10511,10 @@ var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix)
bb.y2 = ly2;
bb.w = lx2 - lx1;
bb.h = ly2 - ly1;
bb.leftPad = leftPad;
bb.rightPad = rightPad;
bb.topPad = topPad;
bb.botPad = botPad;
var isAutorotate = isEdge && rotation.strValue === 'autorotate';
var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0;
if (isAutorotate || isPfValue) {
Expand Down Expand Up @@ -10898,7 +10906,7 @@ var cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) {
var isDirty = function isDirty(ele) {
return ele._private.bbCache == null || ele._private.styleDirty;
};
var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target());
var needRecalc = !useCache || isDirty(ele) || isEdge && (isDirty(ele.source()) || isDirty(ele.target()));
if (needRecalc) {
if (!isPosKeySame) {
ele.recalculateRenderedStyle(useCache);
Expand Down Expand Up @@ -23151,7 +23159,9 @@ BRp$c.findEdgeControlPoints = function (edges) {
hasUnbundled: pairInfo.hasUnbundled,
eles: pairInfo.eles,
srcPos: tgtPos,
srcRs: tgtRs,
tgtPos: srcPos,
tgtRs: srcRs,
srcW: tgtW,
srcH: tgtH,
tgtW: srcW,
Expand Down Expand Up @@ -23238,17 +23248,17 @@ function getPts(pts) {
}
BRp$c.getSegmentPoints = function (edge) {
var rs = edge[0]._private.rscratch;
this.recalculateRenderedStyle(edge);
var type = rs.edgeType;
if (type === 'segments') {
this.recalculateRenderedStyle(edge);
return getPts(rs.segpts);
}
};
BRp$c.getControlPoints = function (edge) {
var rs = edge[0]._private.rscratch;
this.recalculateRenderedStyle(edge);
var type = rs.edgeType;
if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') {
this.recalculateRenderedStyle(edge);
return getPts(rs.ctrlpts);
}
};
Expand Down Expand Up @@ -24308,6 +24318,18 @@ var BRp$3 = {};
BRp$3.registerBinding = function (target, event, handler, useCapture) {
// eslint-disable-line no-unused-vars
var args = Array.prototype.slice.apply(arguments, [1]); // copy

if (Array.isArray(target)) {
var res = [];
for (var i = 0; i < target.length; i++) {
var t = target[i];
if (t !== undefined) {
var b = this.binder(t);
res.push(b.on.apply(b, args));
}
}
return res;
}
var b = this.binder(target);
return b.on.apply(b, args);
};
Expand Down Expand Up @@ -24367,6 +24389,13 @@ BRp$3.load = function () {
var isSelected = function isSelected(ele) {
return ele.selected();
};
var getShadowRoot = function getShadowRoot(element) {
var rootNode = element.getRootNode();
// Check if the root node is a shadow root
if (rootNode && rootNode.nodeType === 11 && rootNode.host !== undefined) {
return rootNode;
}
};
var triggerEvents = function triggerEvents(target, names, e, position) {
if (target == null) {
target = r.cy;
Expand Down Expand Up @@ -24780,7 +24809,8 @@ BRp$3.load = function () {
select[0] = select[2] = pos[0];
select[1] = select[3] = pos[1];
}, false);
r.registerBinding(containerWindow, 'mousemove', function mousemoveHandler(e) {
var shadowRoot = getShadowRoot(r.container);
r.registerBinding([containerWindow, shadowRoot], 'mousemove', function mousemoveHandler(e) {
// eslint-disable-line no-undef
var capture = r.hoverData.capture;
if (!capture && !eventInContainer(e)) {
Expand Down Expand Up @@ -27664,6 +27694,7 @@ var deqFastCost = 0.9; // % of frame time to be used when >60fps
var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch
var invalidThreshold = 250; // time threshold for disabling b/c of invalidations
var maxLayerArea = 4000 * 4000; // layers can't be bigger than this
var maxLayerDim = 32767; // maximum size for the width/height of layer canvases
var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm)

// var log = function(){ console.log.apply( console, arguments ); };
Expand Down Expand Up @@ -27804,7 +27835,12 @@ LTCp.getLayers = function (eles, pxRatio, lvl) {
opts = opts || {};
var after = opts.after;
getBb();
var area = bb.w * scale * (bb.h * scale);
var w = Math.ceil(bb.w * scale);
var h = Math.ceil(bb.h * scale);
if (w > maxLayerDim || h > maxLayerDim) {
return null;
}
var area = w * h;
if (area > maxLayerArea) {
return null;
}
Expand Down Expand Up @@ -30860,18 +30896,18 @@ function CanvasRenderer(options) {
if (ele.isNode()) {
switch (ele.pstyle('text-halign').value) {
case 'left':
p.x = -bb.w;
p.x = -bb.w - (bb.leftPad || 0);
break;
case 'right':
p.x = 0;
p.x = -(bb.rightPad || 0);
break;
}
switch (ele.pstyle('text-valign').value) {
case 'top':
p.y = -bb.h;
p.y = -bb.h - (bb.topPad || 0);
break;
case 'bottom':
p.y = 0;
p.y = -(bb.botPad || 0);
break;
}
}
Expand Down Expand Up @@ -31325,7 +31361,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.30.2";
var version = "3.30.3";

var cytoscape = function cytoscape(options) {
// if no options specified, use default
Expand Down
4 changes: 2 additions & 2 deletions dist/cytoscape.esm.min.mjs

Large diffs are not rendered by default.

64 changes: 50 additions & 14 deletions dist/cytoscape.esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10490,10 +10490,14 @@ var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix)
}

// shift by margin and expand by outline and border
lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
var leftPad = marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
var rightPad = marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
var topPad = marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;
var botPad = marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;
lx1 += leftPad;
lx2 += rightPad;
ly1 += topPad;
ly2 += botPad;

// always store the unrotated label bounds separately
var bbPrefix = prefix || 'main';
Expand All @@ -10505,6 +10509,10 @@ var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix)
bb.y2 = ly2;
bb.w = lx2 - lx1;
bb.h = ly2 - ly1;
bb.leftPad = leftPad;
bb.rightPad = rightPad;
bb.topPad = topPad;
bb.botPad = botPad;
var isAutorotate = isEdge && rotation.strValue === 'autorotate';
var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0;
if (isAutorotate || isPfValue) {
Expand Down Expand Up @@ -10896,7 +10904,7 @@ var cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) {
var isDirty = function isDirty(ele) {
return ele._private.bbCache == null || ele._private.styleDirty;
};
var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target());
var needRecalc = !useCache || isDirty(ele) || isEdge && (isDirty(ele.source()) || isDirty(ele.target()));
if (needRecalc) {
if (!isPosKeySame) {
ele.recalculateRenderedStyle(useCache);
Expand Down Expand Up @@ -23149,7 +23157,9 @@ BRp$c.findEdgeControlPoints = function (edges) {
hasUnbundled: pairInfo.hasUnbundled,
eles: pairInfo.eles,
srcPos: tgtPos,
srcRs: tgtRs,
tgtPos: srcPos,
tgtRs: srcRs,
srcW: tgtW,
srcH: tgtH,
tgtW: srcW,
Expand Down Expand Up @@ -23236,17 +23246,17 @@ function getPts(pts) {
}
BRp$c.getSegmentPoints = function (edge) {
var rs = edge[0]._private.rscratch;
this.recalculateRenderedStyle(edge);
var type = rs.edgeType;
if (type === 'segments') {
this.recalculateRenderedStyle(edge);
return getPts(rs.segpts);
}
};
BRp$c.getControlPoints = function (edge) {
var rs = edge[0]._private.rscratch;
this.recalculateRenderedStyle(edge);
var type = rs.edgeType;
if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') {
this.recalculateRenderedStyle(edge);
return getPts(rs.ctrlpts);
}
};
Expand Down Expand Up @@ -24306,6 +24316,18 @@ var BRp$3 = {};
BRp$3.registerBinding = function (target, event, handler, useCapture) {
// eslint-disable-line no-unused-vars
var args = Array.prototype.slice.apply(arguments, [1]); // copy

if (Array.isArray(target)) {
var res = [];
for (var i = 0; i < target.length; i++) {
var t = target[i];
if (t !== undefined) {
var b = this.binder(t);
res.push(b.on.apply(b, args));
}
}
return res;
}
var b = this.binder(target);
return b.on.apply(b, args);
};
Expand Down Expand Up @@ -24365,6 +24387,13 @@ BRp$3.load = function () {
var isSelected = function isSelected(ele) {
return ele.selected();
};
var getShadowRoot = function getShadowRoot(element) {
var rootNode = element.getRootNode();
// Check if the root node is a shadow root
if (rootNode && rootNode.nodeType === 11 && rootNode.host !== undefined) {
return rootNode;
}
};
var triggerEvents = function triggerEvents(target, names, e, position) {
if (target == null) {
target = r.cy;
Expand Down Expand Up @@ -24778,7 +24807,8 @@ BRp$3.load = function () {
select[0] = select[2] = pos[0];
select[1] = select[3] = pos[1];
}, false);
r.registerBinding(containerWindow, 'mousemove', function mousemoveHandler(e) {
var shadowRoot = getShadowRoot(r.container);
r.registerBinding([containerWindow, shadowRoot], 'mousemove', function mousemoveHandler(e) {
// eslint-disable-line no-undef
var capture = r.hoverData.capture;
if (!capture && !eventInContainer(e)) {
Expand Down Expand Up @@ -27662,6 +27692,7 @@ var deqFastCost = 0.9; // % of frame time to be used when >60fps
var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch
var invalidThreshold = 250; // time threshold for disabling b/c of invalidations
var maxLayerArea = 4000 * 4000; // layers can't be bigger than this
var maxLayerDim = 32767; // maximum size for the width/height of layer canvases
var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm)

// var log = function(){ console.log.apply( console, arguments ); };
Expand Down Expand Up @@ -27802,7 +27833,12 @@ LTCp.getLayers = function (eles, pxRatio, lvl) {
opts = opts || {};
var after = opts.after;
getBb();
var area = bb.w * scale * (bb.h * scale);
var w = Math.ceil(bb.w * scale);
var h = Math.ceil(bb.h * scale);
if (w > maxLayerDim || h > maxLayerDim) {
return null;
}
var area = w * h;
if (area > maxLayerArea) {
return null;
}
Expand Down Expand Up @@ -30858,18 +30894,18 @@ function CanvasRenderer(options) {
if (ele.isNode()) {
switch (ele.pstyle('text-halign').value) {
case 'left':
p.x = -bb.w;
p.x = -bb.w - (bb.leftPad || 0);
break;
case 'right':
p.x = 0;
p.x = -(bb.rightPad || 0);
break;
}
switch (ele.pstyle('text-valign').value) {
case 'top':
p.y = -bb.h;
p.y = -bb.h - (bb.topPad || 0);
break;
case 'bottom':
p.y = 0;
p.y = -(bb.botPad || 0);
break;
}
}
Expand Down Expand Up @@ -31323,7 +31359,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.30.2";
var version = "3.30.3";

var cytoscape = function cytoscape(options) {
// if no options specified, use default
Expand Down
4 changes: 2 additions & 2 deletions dist/cytoscape.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 85f3dc6

Please sign in to comment.