mirror of
https://github.com/nasa/openmct.git
synced 2025-05-11 04:52:57 +00:00
[Build] Relocate operators
...in multi-line expressions, to satisfy JSHint.
This commit is contained in:
parent
56a91dfbaf
commit
c00d77dcb1
@ -79,9 +79,9 @@ define(
|
|||||||
*/
|
*/
|
||||||
function isEditing(context) {
|
function isEditing(context) {
|
||||||
var domainObject = (context || {}).domainObject;
|
var domainObject = (context || {}).domainObject;
|
||||||
return domainObject
|
return domainObject &&
|
||||||
&& domainObject.hasCapability('status')
|
domainObject.hasCapability('status') &&
|
||||||
&& domainObject.getCapability('status').get('editing');
|
domainObject.getCapability('status').get('editing');
|
||||||
}
|
}
|
||||||
|
|
||||||
EditActionPolicy.prototype.allow = function (action, context) {
|
EditActionPolicy.prototype.allow = function (action, context) {
|
||||||
|
@ -45,8 +45,8 @@ define(
|
|||||||
statusCapability = navigatedObject &&
|
statusCapability = navigatedObject &&
|
||||||
navigatedObject.getCapability("status");
|
navigatedObject.getCapability("status");
|
||||||
|
|
||||||
return statusCapability && statusCapability.get('editing')
|
return statusCapability && statusCapability.get('editing') &&
|
||||||
&& editorCapability && editorCapability.dirty();
|
editorCapability && editorCapability.dirty();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -388,8 +388,8 @@ define(
|
|||||||
notifications queued for display, setup a timeout to
|
notifications queued for display, setup a timeout to
|
||||||
dismiss the dialog.
|
dismiss the dialog.
|
||||||
*/
|
*/
|
||||||
if (notification && (notification.model.autoDismiss
|
if (notification && (notification.model.autoDismiss ||
|
||||||
|| this.selectNextNotification())) {
|
this.selectNextNotification())) {
|
||||||
|
|
||||||
timeout = notification.model.autoDismiss || this.DEFAULT_AUTO_DISMISS;
|
timeout = notification.model.autoDismiss || this.DEFAULT_AUTO_DISMISS;
|
||||||
this.active.timeout = this.$timeout(function () {
|
this.active.timeout = this.$timeout(function () {
|
||||||
@ -416,8 +416,8 @@ define(
|
|||||||
for (; i< this.notifications.length; i++) {
|
for (; i< this.notifications.length; i++) {
|
||||||
notification = this.notifications[i];
|
notification = this.notifications[i];
|
||||||
|
|
||||||
if (!notification.model.minimized
|
if (!notification.model.minimized &&
|
||||||
&& notification!== this.active.notification) {
|
notification!== this.active.notification) {
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,8 @@ define(
|
|||||||
|
|
||||||
GoToOriginalAction.appliesTo = function (context) {
|
GoToOriginalAction.appliesTo = function (context) {
|
||||||
var domainObject = context.domainObject;
|
var domainObject = context.domainObject;
|
||||||
return domainObject && domainObject.hasCapability("location")
|
return domainObject && domainObject.hasCapability("location") &&
|
||||||
&& domainObject.getCapability("location").isLink();
|
domainObject.getCapability("location").isLink();
|
||||||
};
|
};
|
||||||
|
|
||||||
return GoToOriginalAction;
|
return GoToOriginalAction;
|
||||||
|
@ -48,8 +48,8 @@ define(
|
|||||||
|
|
||||||
SetPrimaryLocationAction.appliesTo = function (context) {
|
SetPrimaryLocationAction.appliesTo = function (context) {
|
||||||
var domainObject = context.domainObject;
|
var domainObject = context.domainObject;
|
||||||
return domainObject && domainObject.hasCapability("location")
|
return domainObject && domainObject.hasCapability("location") &&
|
||||||
&& (domainObject.getModel().location === undefined);
|
(domainObject.getModel().location === undefined);
|
||||||
};
|
};
|
||||||
|
|
||||||
return SetPrimaryLocationAction;
|
return SetPrimaryLocationAction;
|
||||||
|
@ -68,8 +68,8 @@ define(
|
|||||||
* @returns {boolean} true if domain data exists for the current pan/zoom level
|
* @returns {boolean} true if domain data exists for the current pan/zoom level
|
||||||
*/
|
*/
|
||||||
SubPlot.prototype.hasDomainData = function() {
|
SubPlot.prototype.hasDomainData = function() {
|
||||||
return this.panZoomStack
|
return this.panZoomStack &&
|
||||||
&& this.panZoomStack.getDimensions()[0] > 0;
|
this.panZoomStack.getDimensions()[0] > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Utility function for filtering out empty strings.
|
// Utility function for filtering out empty strings.
|
||||||
|
@ -66,8 +66,8 @@ define(
|
|||||||
|
|
||||||
// Check if the queue's size has stopped increasing)
|
// Check if the queue's size has stopped increasing)
|
||||||
function quiescent() {
|
function quiescent() {
|
||||||
return Object.keys(self.persistences).length
|
return Object.keys(self.persistences).length ===
|
||||||
=== self.lastObservedSize;
|
self.lastObservedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Persist all queued objects
|
// Persist all queued objects
|
||||||
|
@ -45,10 +45,10 @@ define(
|
|||||||
parameters = element && element.attr('parameters') && $parse(element.attr('parameters'))();
|
parameters = element && element.attr('parameters') && $parse(element.attr('parameters'))();
|
||||||
|
|
||||||
function suppressMenu() {
|
function suppressMenu() {
|
||||||
return parameters
|
return parameters &&
|
||||||
&& parameters.suppressMenuOnEdit
|
parameters.suppressMenuOnEdit &&
|
||||||
&& navigationService.getNavigation()
|
navigationService.getNavigation() &&
|
||||||
&& navigationService.getNavigation().hasCapability('editor');
|
navigationService.getNavigation().hasCapability('editor');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMenu(event) {
|
function showMenu(event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user