Skip to content

Commit

Permalink
24.0.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Mar 9, 2024
1 parent ab93af8 commit 4a226fe
Show file tree
Hide file tree
Showing 12 changed files with 400 additions and 384 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
09-MAR-2024: 24.0.4

- [conf cloud] Fixes copied pages with embed upload macro editing [DID-11003]

08-MAR-2024: 24.0.3

- [conf cloud] Enables direct editing without custom content
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
24.0.3
24.0.4
62 changes: 32 additions & 30 deletions src/main/mxgraph/handler/mxEdgeSegmentHandler.js
Expand Up @@ -296,45 +296,47 @@ mxEdgeSegmentHandler.prototype.start = function(x, y, index)
mxEdgeSegmentHandler.prototype.createBends = function()
{
var bends = [];

// Source
var bend = this.createHandleShape(0);
this.initBend(bend);
bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);
bends.push(bend);

var pts = this.getCurrentPoints();

// Waypoints (segment handles)
if (this.graph.isCellBendable(this.state.cell))
if (pts != null)
{
if (this.points == null)
{
this.points = [];
}
// Source
var bend = this.createHandleShape(0);
this.initBend(bend);
bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);
bends.push(bend);

for (var i = 0; i < pts.length - 1; i++)
// Waypoints (segment handles)
if (this.graph.isCellBendable(this.state.cell))
{
bend = this.createVirtualBend();
bends.push(bend);
var horizontal = Math.round(pts[i].x - pts[i + 1].x) == 0;

// Special case where dy is 0 as well
if (Math.round(pts[i].y - pts[i + 1].y) == 0 && i < pts.length - 2)
if (this.points == null)
{
horizontal = Math.round(pts[i].x - pts[i + 2].x) == 0;
this.points = [];
}

for (var i = 0; i < pts.length - 1; i++)
{
bend = this.createVirtualBend();
bends.push(bend);
var horizontal = Math.round(pts[i].x - pts[i + 1].x) == 0;

// Special case where dy is 0 as well
if (Math.round(pts[i].y - pts[i + 1].y) == 0 && i < pts.length - 2)
{
horizontal = Math.round(pts[i].x - pts[i + 2].x) == 0;
}

bend.setCursor((horizontal) ? 'col-resize' : 'row-resize');
this.points.push(new mxPoint(0,0));
}

bend.setCursor((horizontal) ? 'col-resize' : 'row-resize');
this.points.push(new mxPoint(0,0));
}
}

// Target
var bend = this.createHandleShape(pts.length, null, true);
this.initBend(bend);
bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);
bends.push(bend);
// Target
var bend = this.createHandleShape(pts.length, null, true);
this.initBend(bend);
bend.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);
bends.push(bend);
}

return bends;
};
Expand Down
189 changes: 95 additions & 94 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

81 changes: 44 additions & 37 deletions src/main/webapp/js/grapheditor/Graph.js
Expand Up @@ -13287,40 +13287,44 @@ if (typeof mxVertexHandler !== 'undefined')
mxCellEditor.prototype.alignText = function(align, evt)
{
var state = this.graph.getView().getState(this.editingCell);
var dir = mxUtils.getValue(state.style, mxConstants.STYLE_TEXT_DIRECTION,
mxConstants.DEFAULT_TEXT_DIRECTION);
var vertical = dir != null && dir.substring(0, 9) == 'vertical-';
var shiftPressed = evt != null && mxEvent.isShiftDown(evt);

if (shiftPressed || (window.getSelection != null &&
window.getSelection().containsNode != null))

if (state != null)
{
var allSelected = true;
var dir = mxUtils.getValue(state.style, mxConstants.STYLE_TEXT_DIRECTION,
mxConstants.DEFAULT_TEXT_DIRECTION);
var vertical = dir != null && dir.substring(0, 9) == 'vertical-';
var shiftPressed = evt != null && mxEvent.isShiftDown(evt);

this.graph.processElements(this.textarea, function(node)
if (shiftPressed || (window.getSelection != null &&
window.getSelection().containsNode != null))
{
if (shiftPressed || vertical ||
window.getSelection().containsNode(node, true))
var allSelected = true;

this.graph.processElements(this.textarea, function(node)
{
node.removeAttribute('align');
node.style.textAlign = null;
}
else
if (shiftPressed || vertical ||
window.getSelection().containsNode(node, true))
{
node.removeAttribute('align');
node.style.textAlign = null;
}
else
{
allSelected = false;
}
});

if (allSelected || vertical)
{
allSelected = false;
this.graph.cellEditor.setAlign(align);
}
});
}

if (allSelected || vertical)
if (!vertical)
{
this.graph.cellEditor.setAlign(align);
document.execCommand('justify' + align.toLowerCase(), false, null);
}
}

if (!vertical)
{
document.execCommand('justify' + align.toLowerCase(), false, null);
}
};

/**
Expand Down Expand Up @@ -15541,24 +15545,27 @@ if (typeof mxVertexHandler !== 'undefined')
tmp.innerHTML = Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));
var anchor = tmp.getElementsByTagName('a')[index];

if (value == null || value == '')
if (anchor != null)
{
var child = anchor.cloneNode(true).firstChild;
if (value == null || value == '')
{
var child = anchor.cloneNode(true).firstChild;

while (child != null)
while (child != null)
{
anchor.parentNode.insertBefore(child.cloneNode(true), anchor);
child = child.nextSibling;
}

anchor.parentNode.removeChild(anchor);
}
else
{
anchor.parentNode.insertBefore(child.cloneNode(true), anchor);
child = child.nextSibling;
anchor.setAttribute('href', value);
}

anchor.parentNode.removeChild(anchor);
}
else
{
anchor.setAttribute('href', value);
}

this.graph.labelChanged(this.state.cell, tmp.innerHTML);
this.graph.labelChanged(this.state.cell, tmp.innerHTML);
}
});

mxEvent.addListener(changeLink, 'click', mxUtils.bind(this, function(evt)
Expand Down

0 comments on commit 4a226fe

Please sign in to comment.