From c00d77dcb11338c67fe01ee610c7a77ed331fda3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:02:57 -0800 Subject: [PATCH] [Build] Relocate operators ...in multi-line expressions, to satisfy JSHint. --- platform/commonUI/edit/src/policies/EditActionPolicy.js | 6 +++--- .../commonUI/edit/src/policies/EditNavigationPolicy.js | 4 ++-- platform/commonUI/notification/src/NotificationService.js | 8 ++++---- platform/entanglement/src/actions/GoToOriginalAction.js | 4 ++-- .../entanglement/src/actions/SetPrimaryLocationAction.js | 4 ++-- platform/features/plot/src/SubPlot.js | 4 ++-- platform/persistence/queue/src/PersistenceQueueImpl.js | 4 ++-- .../representation/src/gestures/ContextMenuGesture.js | 8 ++++---- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/platform/commonUI/edit/src/policies/EditActionPolicy.js b/platform/commonUI/edit/src/policies/EditActionPolicy.js index a3a43fa81e..8c4ffc2641 100644 --- a/platform/commonUI/edit/src/policies/EditActionPolicy.js +++ b/platform/commonUI/edit/src/policies/EditActionPolicy.js @@ -79,9 +79,9 @@ define( */ function isEditing(context) { var domainObject = (context || {}).domainObject; - return domainObject - && domainObject.hasCapability('status') - && domainObject.getCapability('status').get('editing'); + return domainObject && + domainObject.hasCapability('status') && + domainObject.getCapability('status').get('editing'); } EditActionPolicy.prototype.allow = function (action, context) { diff --git a/platform/commonUI/edit/src/policies/EditNavigationPolicy.js b/platform/commonUI/edit/src/policies/EditNavigationPolicy.js index 6797ac4eb1..62c489b35d 100644 --- a/platform/commonUI/edit/src/policies/EditNavigationPolicy.js +++ b/platform/commonUI/edit/src/policies/EditNavigationPolicy.js @@ -45,8 +45,8 @@ define( statusCapability = navigatedObject && navigatedObject.getCapability("status"); - return statusCapability && statusCapability.get('editing') - && editorCapability && editorCapability.dirty(); + return statusCapability && statusCapability.get('editing') && + editorCapability && editorCapability.dirty(); }; /** diff --git a/platform/commonUI/notification/src/NotificationService.js b/platform/commonUI/notification/src/NotificationService.js index 6ee888d57c..7d3ab2c61d 100644 --- a/platform/commonUI/notification/src/NotificationService.js +++ b/platform/commonUI/notification/src/NotificationService.js @@ -388,8 +388,8 @@ define( notifications queued for display, setup a timeout to dismiss the dialog. */ - if (notification && (notification.model.autoDismiss - || this.selectNextNotification())) { + if (notification && (notification.model.autoDismiss || + this.selectNextNotification())) { timeout = notification.model.autoDismiss || this.DEFAULT_AUTO_DISMISS; this.active.timeout = this.$timeout(function () { @@ -416,8 +416,8 @@ define( for (; i< this.notifications.length; i++) { notification = this.notifications[i]; - if (!notification.model.minimized - && notification!== this.active.notification) { + if (!notification.model.minimized && + notification!== this.active.notification) { return notification; } diff --git a/platform/entanglement/src/actions/GoToOriginalAction.js b/platform/entanglement/src/actions/GoToOriginalAction.js index 6a1dbc6343..f68225d3b3 100644 --- a/platform/entanglement/src/actions/GoToOriginalAction.js +++ b/platform/entanglement/src/actions/GoToOriginalAction.js @@ -50,8 +50,8 @@ define( GoToOriginalAction.appliesTo = function (context) { var domainObject = context.domainObject; - return domainObject && domainObject.hasCapability("location") - && domainObject.getCapability("location").isLink(); + return domainObject && domainObject.hasCapability("location") && + domainObject.getCapability("location").isLink(); }; return GoToOriginalAction; diff --git a/platform/entanglement/src/actions/SetPrimaryLocationAction.js b/platform/entanglement/src/actions/SetPrimaryLocationAction.js index d47ef4a28d..6fbdf89cbc 100644 --- a/platform/entanglement/src/actions/SetPrimaryLocationAction.js +++ b/platform/entanglement/src/actions/SetPrimaryLocationAction.js @@ -48,8 +48,8 @@ define( SetPrimaryLocationAction.appliesTo = function (context) { var domainObject = context.domainObject; - return domainObject && domainObject.hasCapability("location") - && (domainObject.getModel().location === undefined); + return domainObject && domainObject.hasCapability("location") && + (domainObject.getModel().location === undefined); }; return SetPrimaryLocationAction; diff --git a/platform/features/plot/src/SubPlot.js b/platform/features/plot/src/SubPlot.js index b2a31cc8ca..d016d4730d 100644 --- a/platform/features/plot/src/SubPlot.js +++ b/platform/features/plot/src/SubPlot.js @@ -68,8 +68,8 @@ define( * @returns {boolean} true if domain data exists for the current pan/zoom level */ SubPlot.prototype.hasDomainData = function() { - return this.panZoomStack - && this.panZoomStack.getDimensions()[0] > 0; + return this.panZoomStack && + this.panZoomStack.getDimensions()[0] > 0; }; // Utility function for filtering out empty strings. diff --git a/platform/persistence/queue/src/PersistenceQueueImpl.js b/platform/persistence/queue/src/PersistenceQueueImpl.js index d344efe2b5..f177800afe 100644 --- a/platform/persistence/queue/src/PersistenceQueueImpl.js +++ b/platform/persistence/queue/src/PersistenceQueueImpl.js @@ -66,8 +66,8 @@ define( // Check if the queue's size has stopped increasing) function quiescent() { - return Object.keys(self.persistences).length - === self.lastObservedSize; + return Object.keys(self.persistences).length === + self.lastObservedSize; } // Persist all queued objects diff --git a/platform/representation/src/gestures/ContextMenuGesture.js b/platform/representation/src/gestures/ContextMenuGesture.js index 36d5aea65e..78abed5347 100644 --- a/platform/representation/src/gestures/ContextMenuGesture.js +++ b/platform/representation/src/gestures/ContextMenuGesture.js @@ -45,10 +45,10 @@ define( parameters = element && element.attr('parameters') && $parse(element.attr('parameters'))(); function suppressMenu() { - return parameters - && parameters.suppressMenuOnEdit - && navigationService.getNavigation() - && navigationService.getNavigation().hasCapability('editor'); + return parameters && + parameters.suppressMenuOnEdit && + navigationService.getNavigation() && + navigationService.getNavigation().hasCapability('editor'); } function showMenu(event) {