Inspector location (#2317)

* working original location - todo link location

* remove link location for now

* remove legacy getPath and implement new getOriginalPath API call

* simplify getOriginalPath, and use path to calculate parent paths in location.vue
This commit is contained in:
Deep Tailor
2019-03-21 12:41:40 -07:00
committed by Andrew Henry
parent bcbf244fd2
commit df53af7b4d
2 changed files with 61 additions and 8 deletions

View File

@ -226,7 +226,20 @@ define([
(identifier.namespace === identifiers[0].namespace &&
identifier.key === identifiers[0].key);
});
}
};
ObjectAPI.prototype.getOriginalPath = function (identifier, path = []) {
return this.get(identifier).then((domainObject) => {
path.push(domainObject);
let location = domainObject.location;
if (location) {
return this.getOriginalPath(utils.parseKeyString(location), path);
} else {
return path;
}
});
};
/**
* Uniquely identifies a domain object.