Skip to content

Commit

Permalink
Build 3.29.3
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkfranz committed Jun 27, 2024
1 parent 7917c82 commit 106bfb9
Show file tree
Hide file tree
Showing 7 changed files with 154 additions and 66 deletions.
60 changes: 41 additions & 19 deletions dist/cytoscape.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23865,8 +23865,8 @@ BRp$9.getLabelText = function (ele, prefix) {
var overflow = ele.pstyle('text-overflow-wrap').value;
var overflowAny = overflow === 'anywhere';
var wrappedLines = [];
var wordsRegex = /[\s\u200b]+/;
var wordSeparator = overflowAny ? '' : ' ';
var separatorRegex = /[\s\u200b]+|$/g; // Include end of string to add last word

for (var l = 0; l < lines.length; l++) {
var line = lines[l];
var lineDims = this.calculateLabelDimensions(ele, line);
Expand All @@ -23877,26 +23877,39 @@ BRp$9.getLabelText = function (ele, prefix) {
}
if (lineW > maxW) {
// line is too long
var words = line.split(wordsRegex);
var separatorMatches = line.matchAll(separatorRegex);
var subline = '';
for (var w = 0; w < words.length; w++) {
var word = words[w];
var testLine = subline.length === 0 ? word : subline + wordSeparator + word;
var testDims = this.calculateLabelDimensions(ele, testLine);
var testW = testDims.width;
if (testW <= maxW) {
// word fits on current line
subline += word + wordSeparator;
} else {
// word starts new line
if (subline) {
wrappedLines.push(subline);
var previousIndex = 0;
// Add fake match
var _iterator = _createForOfIteratorHelper(separatorMatches),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var separatorMatch = _step.value;
var wordSeparator = separatorMatch[0];
var word = line.substring(previousIndex, separatorMatch.index);
previousIndex = separatorMatch.index + wordSeparator.length;
var testLine = subline.length === 0 ? word : subline + word + wordSeparator;
var testDims = this.calculateLabelDimensions(ele, testLine);
var testW = testDims.width;
if (testW <= maxW) {
// word fits on current line
subline += word + wordSeparator;
} else {
// word starts new line
if (subline) {
wrappedLines.push(subline);
}
subline = word + wordSeparator;
}
subline = word + wordSeparator;
}
}

// if there's remaining text, put it in a wrapped line
// if there's remaining text, put it in a wrapped line
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
if (!subline.match(/^[\s\u200b]+$/)) {
wrappedLines.push(subline);
}
Expand Down Expand Up @@ -24616,6 +24629,11 @@ BRp$3.load = function () {
if (!eventInContainer(e)) {
return;
}

// during left mouse button gestures, ignore other buttons
if (r.hoverData.which === 1 && e.which !== 1) {
return;
}
e.preventDefault();
blurActiveDomElement();
r.hoverData.capture = true;
Expand Down Expand Up @@ -25000,6 +25018,10 @@ BRp$3.load = function () {
var clickTimeout, didDoubleClick, prevClickTimeStamp;
r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) {
// eslint-disable-line no-undef
// during left mouse button gestures, ignore other buttons
if (r.hoverData.which === 1 && e.which !== 1 && r.hoverData.capture) {
return;
}
var capture = r.hoverData.capture;
if (!capture) {
return;
Expand Down Expand Up @@ -31266,7 +31288,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.29.2";
var version = "3.29.3";

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

Large diffs are not rendered by default.

60 changes: 41 additions & 19 deletions dist/cytoscape.esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23863,8 +23863,8 @@ BRp$9.getLabelText = function (ele, prefix) {
var overflow = ele.pstyle('text-overflow-wrap').value;
var overflowAny = overflow === 'anywhere';
var wrappedLines = [];
var wordsRegex = /[\s\u200b]+/;
var wordSeparator = overflowAny ? '' : ' ';
var separatorRegex = /[\s\u200b]+|$/g; // Include end of string to add last word

for (var l = 0; l < lines.length; l++) {
var line = lines[l];
var lineDims = this.calculateLabelDimensions(ele, line);
Expand All @@ -23875,26 +23875,39 @@ BRp$9.getLabelText = function (ele, prefix) {
}
if (lineW > maxW) {
// line is too long
var words = line.split(wordsRegex);
var separatorMatches = line.matchAll(separatorRegex);
var subline = '';
for (var w = 0; w < words.length; w++) {
var word = words[w];
var testLine = subline.length === 0 ? word : subline + wordSeparator + word;
var testDims = this.calculateLabelDimensions(ele, testLine);
var testW = testDims.width;
if (testW <= maxW) {
// word fits on current line
subline += word + wordSeparator;
} else {
// word starts new line
if (subline) {
wrappedLines.push(subline);
var previousIndex = 0;
// Add fake match
var _iterator = _createForOfIteratorHelper(separatorMatches),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var separatorMatch = _step.value;
var wordSeparator = separatorMatch[0];
var word = line.substring(previousIndex, separatorMatch.index);
previousIndex = separatorMatch.index + wordSeparator.length;
var testLine = subline.length === 0 ? word : subline + word + wordSeparator;
var testDims = this.calculateLabelDimensions(ele, testLine);
var testW = testDims.width;
if (testW <= maxW) {
// word fits on current line
subline += word + wordSeparator;
} else {
// word starts new line
if (subline) {
wrappedLines.push(subline);
}
subline = word + wordSeparator;
}
subline = word + wordSeparator;
}
}

// if there's remaining text, put it in a wrapped line
// if there's remaining text, put it in a wrapped line
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
if (!subline.match(/^[\s\u200b]+$/)) {
wrappedLines.push(subline);
}
Expand Down Expand Up @@ -24614,6 +24627,11 @@ BRp$3.load = function () {
if (!eventInContainer(e)) {
return;
}

// during left mouse button gestures, ignore other buttons
if (r.hoverData.which === 1 && e.which !== 1) {
return;
}
e.preventDefault();
blurActiveDomElement();
r.hoverData.capture = true;
Expand Down Expand Up @@ -24998,6 +25016,10 @@ BRp$3.load = function () {
var clickTimeout, didDoubleClick, prevClickTimeStamp;
r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) {
// eslint-disable-line no-undef
// during left mouse button gestures, ignore other buttons
if (r.hoverData.which === 1 && e.which !== 1 && r.hoverData.capture) {
return;
}
var capture = r.hoverData.capture;
if (!capture) {
return;
Expand Down Expand Up @@ -31264,7 +31286,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.29.2";
var version = "3.29.3";

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

Large diffs are not rendered by default.

60 changes: 41 additions & 19 deletions dist/cytoscape.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -23869,8 +23869,8 @@ var printLayoutInfo;
var overflow = ele.pstyle('text-overflow-wrap').value;
var overflowAny = overflow === 'anywhere';
var wrappedLines = [];
var wordsRegex = /[\s\u200b]+/;
var wordSeparator = overflowAny ? '' : ' ';
var separatorRegex = /[\s\u200b]+|$/g; // Include end of string to add last word

for (var l = 0; l < lines.length; l++) {
var line = lines[l];
var lineDims = this.calculateLabelDimensions(ele, line);
Expand All @@ -23881,26 +23881,39 @@ var printLayoutInfo;
}
if (lineW > maxW) {
// line is too long
var words = line.split(wordsRegex);
var separatorMatches = line.matchAll(separatorRegex);
var subline = '';
for (var w = 0; w < words.length; w++) {
var word = words[w];
var testLine = subline.length === 0 ? word : subline + wordSeparator + word;
var testDims = this.calculateLabelDimensions(ele, testLine);
var testW = testDims.width;
if (testW <= maxW) {
// word fits on current line
subline += word + wordSeparator;
} else {
// word starts new line
if (subline) {
wrappedLines.push(subline);
var previousIndex = 0;
// Add fake match
var _iterator = _createForOfIteratorHelper(separatorMatches),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var separatorMatch = _step.value;
var wordSeparator = separatorMatch[0];
var word = line.substring(previousIndex, separatorMatch.index);
previousIndex = separatorMatch.index + wordSeparator.length;
var testLine = subline.length === 0 ? word : subline + word + wordSeparator;
var testDims = this.calculateLabelDimensions(ele, testLine);
var testW = testDims.width;
if (testW <= maxW) {
// word fits on current line
subline += word + wordSeparator;
} else {
// word starts new line
if (subline) {
wrappedLines.push(subline);
}
subline = word + wordSeparator;
}
subline = word + wordSeparator;
}
}

// if there's remaining text, put it in a wrapped line
// if there's remaining text, put it in a wrapped line
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
if (!subline.match(/^[\s\u200b]+$/)) {
wrappedLines.push(subline);
}
Expand Down Expand Up @@ -24620,6 +24633,11 @@ var printLayoutInfo;
if (!eventInContainer(e)) {
return;
}

// during left mouse button gestures, ignore other buttons
if (r.hoverData.which === 1 && e.which !== 1) {
return;
}
e.preventDefault();
blurActiveDomElement();
r.hoverData.capture = true;
Expand Down Expand Up @@ -25004,6 +25022,10 @@ var printLayoutInfo;
var clickTimeout, didDoubleClick, prevClickTimeStamp;
r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) {
// eslint-disable-line no-undef
// during left mouse button gestures, ignore other buttons
if (r.hoverData.which === 1 && e.which !== 1 && r.hoverData.capture) {
return;
}
var capture = r.hoverData.capture;
if (!capture) {
return;
Expand Down Expand Up @@ -31270,7 +31292,7 @@ var printLayoutInfo;
return style;
};

var version = "3.29.2";
var version = "3.29.3";

var cytoscape = function cytoscape(options) {
// if no options specified, use default
Expand Down
22 changes: 22 additions & 0 deletions documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,9 @@ <h2 id="introduction/releases">Releases <a href="#introduction/releases"><span c
<li>
3.29
<ul>
<li>
<a target="_blank" href="https://github.com/cytoscape/cytoscape.js/issues?q&#x3D;milestone%3A3.29.3+is%3Aclosed">3.29.3</a>
</li>
<li>
<a target="_blank" href="https://github.com/cytoscape/cytoscape.js/issues?q&#x3D;milestone%3A3.29.2+is%3Aclosed">3.29.2</a>
</li>
Expand Down Expand Up @@ -4446,6 +4449,24 @@ <h3 id="examples">Examples</h3>
</div>


<div class="details">
<h3 id="details">Details</h3>
<p>This function returns a plain object bounding box with format <code>{ x1, y1, x2, y2, w, h }</code>.</p>

</div>
</div>
<div class="function">
<div class="name" id="cy.renderedExtent">
<span class="fn-name">cy.renderedExtent()</span> <a href="#cy.renderedExtent"><span class="fa fa-bookmark"></span></a>
<span id="core/viewport-manipulation/cy.renderedExtent">&nbsp;</span>
</div>



<div class="descr"><p>Get the width and height of the viewport canvas in <a href="#notation/position">rendered (on-screen) points</a>.</p>
</div>


<div class="details">
<h3 id="details">Details</h3>
<p>This function returns a plain object bounding box with format <code>{ x1, y1, x2, y2, w, h }</code>.</p>
Expand Down Expand Up @@ -16853,6 +16874,7 @@ <h2 id="performance/optimisations">Optimisations <a href="#performance/optimisat
<div class="section lvl3"><a class="toclink" href="#cy.width">cy.width() </a></div>
<div class="section lvl3"><a class="toclink" href="#cy.height">cy.height() </a></div>
<div class="section lvl3"><a class="toclink" href="#cy.extent">cy.extent() </a></div>
<div class="section lvl3"><a class="toclink" href="#cy.renderedExtent">cy.renderedExtent() </a></div>
<div class="section lvl3"><a class="toclink" href="#cy.autolock">cy.autolock() </a></div>
<div class="section lvl3"><a class="toclink" href="#cy.autoungrabify">cy.autoungrabify() </a></div>
<div class="section lvl3"><a class="toclink" href="#cy.autounselectify">cy.autounselectify() </a></div>
Expand Down
6 changes: 3 additions & 3 deletions documentation/js/cytoscape.min.js

Large diffs are not rendered by default.

0 comments on commit 106bfb9

Please sign in to comment.