Skip to content

Commit

Permalink
22.1.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Dec 12, 2023
1 parent e5620b3 commit 8373cb7
Show file tree
Hide file tree
Showing 89 changed files with 6,933 additions and 6,325 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
12-DEC-2023: 22.1.8

- Adds color option in freehand dialog [drawio-3454]
- Fixes reset icon for recent colors in dark mode
- Adds appendCustomLibraries config switch [drawio-4027]
- Fixes direction of edges in horizontal tree layout [DID-10171]
- Sets edgeStyle for edges inserted from sidebar [drawio-1122]
- Fixes scroll to inserted page tab

06-DEC-2023: 22.1.7

- Fixes possible getAttribute is not a function
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.1.7
22.1.8
25 changes: 1 addition & 24 deletions src/main/mxgraph/handler/mxGraphHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,29 +416,6 @@ mxGraphHandler.prototype.setRemoveCellsFromParent = function(value)
this.removeCellsFromParent = value;
};

/**
* Function: isAncestorSelected
*
* Returns true if the given cell and parent should propagate
* selection state to the parent.
*/
mxGraphHandler.prototype.isAncestorSelected = function(cell)
{
var parent = this.graph.model.getParent(cell);

while (parent != null)
{
if (this.graph.isCellSelected(parent))
{
return true;
}

parent = this.graph.model.getParent(parent);
}

return false;
};

/**
* Function: isPropagateSelectionCell
*
Expand Down Expand Up @@ -1120,7 +1097,7 @@ mxGraphHandler.prototype.mouseMove = function(sender, me)
{
graph.addSelectionCell(this.cell);
}
else if (!this.isAncestorSelected(this.cell))
else if (!this.graph.isAncestorSelected(this.cell))
{
graph.setSelectionCell(this.cell);
}
Expand Down
30 changes: 22 additions & 8 deletions src/main/mxgraph/io/mxCodec.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,17 @@ mxCodec.prototype.addElement = function(node)
}
};

/**
* Function: isObjectIgnored
*
* Returns true if the given object is ignored by the codec. This
* implementation always returns false.
*/
mxCodec.prototype.isObjectIgnored = function(obj)
{
return false;
};

/**
* Function: getId
*
Expand All @@ -319,7 +330,7 @@ mxCodec.prototype.getId = function(obj)
{
var id = null;

if (obj != null)
if (obj != null && !this.isObjectIgnored(obj))
{
id = this.reference(obj);

Expand Down Expand Up @@ -383,7 +394,7 @@ mxCodec.prototype.encode = function(obj)
{
var node = null;

if (obj != null && obj.constructor != null)
if (obj != null && obj.constructor != null && !this.isObjectIgnored(obj))
{
var enc = mxCodecRegistry.getCodec(obj.constructor);

Expand Down Expand Up @@ -503,15 +514,18 @@ mxCodec.prototype.getConstructor = function(name)
*/
mxCodec.prototype.encodeCell = function(cell, node, includeChildren)
{
node.appendChild(this.encode(cell));

if (includeChildren == null || includeChildren)
if (!this.isObjectIgnored(cell))
{
var childCount = cell.getChildCount();
node.appendChild(this.encode(cell));

for (var i = 0; i < childCount; i++)
if (includeChildren == null || includeChildren)
{
this.encodeCell(cell.getChildAt(i), node);
var childCount = cell.getChildCount();

for (var i = 0; i < childCount; i++)
{
this.encodeCell(cell.getChildAt(i), node);
}
}
}
};
Expand Down
23 changes: 23 additions & 0 deletions src/main/mxgraph/view/mxGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -12316,6 +12316,29 @@ mxGraph.prototype.isCellSelected = function(cell)
return this.getSelectionModel().isSelected(cell);
};

/**
* Function: isAncestorSelected
*
* Returns true if the given cell and parent should propagate
* selection state to the parent.
*/
mxGraph.prototype.isAncestorSelected = function(cell)
{
var parent = this.model.getParent(cell);

while (parent != null)
{
if (this.isCellSelected(parent))
{
return true;
}

parent = this.model.getParent(parent);
}

return false;
};

/**
* Function: isSelectionEmpty
*
Expand Down
Binary file added src/main/webapp/images/defaultcolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/webapp/images/search.png
Binary file not shown.
6,217 changes: 3,116 additions & 3,101 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/main/webapp/js/diagramly/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5744,6 +5744,10 @@ App.prototype.loadLibraries = function(libs, done)
onerror();
}, null, true);
}
else
{
onerror(true);
}
}
else if (service == 'R')
{
Expand Down
Loading

0 comments on commit 8373cb7

Please sign in to comment.