|
@@ -2379,8 +2379,11 @@
|
|
|
|
|
|
if (details != null)
|
|
|
{
|
|
|
- details.cellCount = 0;
|
|
|
+ details.byteCount = 0;
|
|
|
+ details.attrCount = 0;
|
|
|
+ details.eltCount = 0;
|
|
|
details.nodeCount = 0;
|
|
|
+ details.cellCount = 0;
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i < pages.length; i++)
|
|
@@ -2400,11 +2403,12 @@
|
|
|
|
|
|
if (details != null)
|
|
|
{
|
|
|
+ details.eltCount += diagram.getElementsByTagName('*').length;
|
|
|
details.nodeCount += diagram.getElementsByTagName('mxCell').length;
|
|
|
details.cellCount += model.getDescendants(model.root).length;
|
|
|
}
|
|
|
|
|
|
- hash = ((hash << 5) - hash + this.hashValue(diagram)) << 0;
|
|
|
+ hash = ((hash << 5) - hash + this.hashValue(diagram, null, details)) << 0;
|
|
|
}
|
|
|
|
|
|
return hash;
|
|
@@ -2414,7 +2418,7 @@
|
|
|
* Creates a hash value for the given object. Replacer returns the value of the
|
|
|
* property or attribute for the given object or XML node.
|
|
|
*/
|
|
|
- EditorUi.prototype.hashValue = function(obj, replacer)
|
|
|
+ EditorUi.prototype.hashValue = function(obj, replacer, details)
|
|
|
{
|
|
|
var hash = 0;
|
|
|
|
|
@@ -2429,6 +2433,11 @@
|
|
|
|
|
|
if (obj.attributes != null)
|
|
|
{
|
|
|
+ if (details != null)
|
|
|
+ {
|
|
|
+ details.attrCount += obj.attributes.length;
|
|
|
+ }
|
|
|
+
|
|
|
for (var i = 0; i < obj.attributes.length; i++)
|
|
|
{
|
|
|
var key = obj.attributes[i].name;
|
|
@@ -2436,8 +2445,8 @@
|
|
|
|
|
|
if (value != null)
|
|
|
{
|
|
|
- hash = hash ^ (this.hashValue(key, replacer) +
|
|
|
- this.hashValue(value, replacer));
|
|
|
+ hash = hash ^ (this.hashValue(key, replacer, details) +
|
|
|
+ this.hashValue(value, replacer, details));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2446,7 +2455,8 @@
|
|
|
{
|
|
|
for (var i = 0; i < obj.childNodes.length; i++)
|
|
|
{
|
|
|
- hash = ((hash << 5) - hash + this.hashValue(obj.childNodes[i], replacer)) << 0;
|
|
|
+ hash = ((hash << 5) - hash + this.hashValue(
|
|
|
+ obj.childNodes[i], replacer, details)) << 0;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2454,6 +2464,11 @@
|
|
|
{
|
|
|
var str = String(obj);
|
|
|
var temp = 0;
|
|
|
+
|
|
|
+ if (details != null)
|
|
|
+ {
|
|
|
+ details.byteCount += str.length;
|
|
|
+ }
|
|
|
|
|
|
for (var i = 0; i < str.length; i++)
|
|
|
{
|