mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
only compare properties which exist for both objects in 'numeric comparer'
note: this is attempt to quick-n-dirty workaround weird issue with having colors informaiton inside 'dimensions' in the latest master example: "blue": 0.2367398738861084, "green": 0.08945406973361969, "red": 0.25246158242225647, "x": 0.25246158242225647, "y": 0.08945406973361969, "z": 0.2367398738861084
This commit is contained in:
parent
67fb8af87c
commit
536395d199
1 changed files with 7 additions and 4 deletions
|
@ -121,11 +121,14 @@ ListModel {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for(var prop in o1) {
|
for(var prop in o1) {
|
||||||
var v1 = o1[prop];
|
if(o1.hasOwnProperty(prop) && o2.hasOwnProperty(prop)) {
|
||||||
var v2 = o2[prop];
|
var v1 = o1[prop];
|
||||||
|
var v2 = o2[prop];
|
||||||
|
|
||||||
if(v1 !== v2 && Math.round(v1 * 1000) != Math.round(v2 * 1000))
|
|
||||||
return false;
|
if(v1 !== v2 && Math.round(v1 * 1000) != Math.round(v2 * 1000))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue