mirror of
https://github.com/nasa/openmct.git
synced 2025-04-01 16:41:02 +00:00
[Copy] #338 updated code style in CreationPolicy
This commit is contained in:
parent
96249e6bcc
commit
f8099550bd
@ -27,23 +27,19 @@ define(
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* A policy for determining whether objects of a certain type can be
|
||||
* A policy for determining whether objects of a given type can be
|
||||
* created.
|
||||
* @returns {{allow: Function}}
|
||||
* @constructor
|
||||
* @implements {Policy}
|
||||
* @memberof platform/commonUI/browse
|
||||
*/
|
||||
function CreationPolicy() {
|
||||
return {
|
||||
/**
|
||||
* Only allow creation of object types that have the
|
||||
* Creation capability
|
||||
*/
|
||||
allow: function (type) {
|
||||
return type.hasFeature("creation");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
CreationPolicy.prototype.allow = function (type) {
|
||||
return type.hasFeature("creation");
|
||||
};
|
||||
|
||||
return CreationPolicy;
|
||||
}
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user