mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
[Code Style] Rename shadowing variables
This commit is contained in:
@ -105,15 +105,15 @@ define(
|
||||
// Check if an object has all capabilities designated as `needs`
|
||||
// for a view. Exposing a capability via delegation is taken to
|
||||
// satisfy this filter if `allowDelegation` is true.
|
||||
function capabilitiesMatch(domainObject, capabilities, allowDelegation) {
|
||||
var delegation = domainObject.getCapability("delegation");
|
||||
function capabilitiesMatch(domainObj, capabilities, allowDelegation) {
|
||||
var delegation = domainObj.getCapability("delegation");
|
||||
|
||||
allowDelegation = allowDelegation && (delegation !== undefined);
|
||||
|
||||
// Check if an object has (or delegates, if allowed) a
|
||||
// capability.
|
||||
function hasCapability(c) {
|
||||
return domainObject.hasCapability(c) ||
|
||||
return domainObj.hasCapability(c) ||
|
||||
(allowDelegation && delegation.doesDelegateCapability(c));
|
||||
}
|
||||
|
||||
@ -128,13 +128,13 @@ define(
|
||||
|
||||
// Check if a view and domain object type can be paired;
|
||||
// both can restrict the others they accept.
|
||||
function viewMatchesType(view, type) {
|
||||
var views = type && (type.getDefinition() || {}).views,
|
||||
function viewMatchesType(view, objType) {
|
||||
var views = objType && (objType.getDefinition() || {}).views,
|
||||
matches = true;
|
||||
|
||||
// View is restricted to a certain type
|
||||
if (view.type) {
|
||||
matches = matches && type && type.instanceOf(view.type);
|
||||
matches = matches && objType && objType.instanceOf(view.type);
|
||||
}
|
||||
|
||||
// Type wishes to restrict its specific views
|
||||
|
Reference in New Issue
Block a user