[Code Style] Run gulp fixstyle

...to apply code style settings from #142.
This commit is contained in:
Victor Woeltjen
2016-05-19 11:29:13 -07:00
parent f12b9704d9
commit fa77139077
440 changed files with 1885 additions and 1662 deletions

View File

@ -49,7 +49,7 @@ define(
var rowData = [],
self = this;
this.handle.getTelemetryObjects().forEach(function (telemetryObject){
this.handle.getTelemetryObjects().forEach(function (telemetryObject) {
var series = self.handle.getSeries(telemetryObject) || {},
pointCount = series.getPointCount ? series.getPointCount() : 0,
i = 0;

View File

@ -89,8 +89,8 @@ define(
//Use timeout to defer execution until next digest when any
// pending UI changes have completed, eg. a new row in the table.
if (this.$scope.autoScroll) {
this.$timeout(function (){
self.scrollable[0].scrollTop = self.scrollable[0].scrollHeight;
this.$timeout(function () {
self.scrollable[0].scrollTop = self.scrollable[0].scrollHeight;
});
}
};
@ -125,10 +125,10 @@ define(
// Do a sequential search here. Only way of finding row is by
// object equality, so array is in effect unsorted.
indexInDisplayRows = this.$scope.displayRows.indexOf(row);
if (indexInDisplayRows !== -1) {
this.$scope.displayRows.splice(indexInDisplayRows, 1);
this.setVisibleRows();
}
if (indexInDisplayRows !== -1) {
this.$scope.displayRows.splice(indexInDisplayRows, 1);
this.setVisibleRows();
}
};
/**
@ -222,7 +222,7 @@ define(
* sorting.
*/
MCTTableController.prototype.setHeaders = function (newHeaders) {
if (!newHeaders){
if (!newHeaders) {
return;
}
@ -234,8 +234,8 @@ define(
// contain the column currently sorted on.
if (this.$scope.enableSort &&
newHeaders.indexOf(this.$scope.sortColumn) === -1) {
this.$scope.sortColumn = undefined;
this.$scope.sortDirection = undefined;
this.$scope.sortColumn = undefined;
this.$scope.sortDirection = undefined;
}
this.setRows(this.$scope.rows);
};
@ -283,14 +283,14 @@ define(
self = this,
sortKey = this.$scope.sortColumn;
function binarySearch(searchArray, searchElement, min, max){
function binarySearch(searchArray, searchElement, min, max) {
var sampleAt = Math.floor((max - min) / 2) + min;
if (max < min) {
return min; // Element is not in array, min gives direction
}
switch(self.sortComparator(searchElement[sortKey].text,
switch (self.sortComparator(searchElement[sortKey].text,
searchArray[sampleAt][sortKey].text)) {
case -1:
return binarySearch(searchArray, searchElement, min,
@ -310,9 +310,9 @@ define(
//Sort is enabled, perform binary search to find insertion point
index = binarySearch(array, element, 0, array.length - 1);
}
if (index === -1){
if (index === -1) {
array.unshift(element);
} else if (index === array.length){
} else if (index === array.length) {
array.push(element);
} else {
array.splice(index, 0, element);
@ -342,7 +342,7 @@ define(
* @returns {*} The value cast to a Number, or the original value if
* a Number representation is not possible.
*/
function toNumber (value){
function toNumber(value) {
var val = !isNaN(Number(value)) && !isNaN(parseFloat(value)) ? Number(value) : value;
return val;
}
@ -410,7 +410,7 @@ define(
currentColumnLength,
largestColumn,
largestColumnLength;
if (row[key]){
if (row[key]) {
currentColumn = (row[key]).text;
currentColumnLength =
(currentColumn && currentColumn.length) ?

View File

@ -58,7 +58,7 @@ define(
$scope.$watch('domainObject', function (domainObject) {
//When a domain object becomes available, check whether the
// view should auto-scroll to the bottom.
if (domainObject && hasStringTelemetry(domainObject)){
if (domainObject && hasStringTelemetry(domainObject)) {
$scope.autoScroll = true;
}
});
@ -70,11 +70,11 @@ define(
* Overrides method on TelemetryTableController providing handling
* for realtime data.
*/
RealtimeTableController.prototype.addRealtimeData = function() {
RealtimeTableController.prototype.addRealtimeData = function () {
var self = this,
datum,
row;
this.handle.getTelemetryObjects().forEach(function (telemetryObject){
this.handle.getTelemetryObjects().forEach(function (telemetryObject) {
datum = self.handle.getDatum(telemetryObject);
if (datum) {
//Populate row values from telemetry datum

View File

@ -59,7 +59,7 @@ define(
});
}
$scope.$watch('domainObject', function(domainObject) {
$scope.$watch('domainObject', function (domainObject) {
unlisten();
self.populateForm(domainObject.getModel());
@ -72,10 +72,10 @@ define(
* Maintain a configuration object on scope that stores column
* configuration. On change, synchronize with object model.
*/
$scope.$watchCollection('configuration.table.columns', function (columns){
if (columns){
$scope.$watchCollection('configuration.table.columns', function (columns) {
if (columns) {
self.domainObject.useCapability('mutation', function (model) {
model.configuration.table.columns = columns;
model.configuration.table.columns = columns;
});
self.domainObject.getCapability('persistence').persist();
}
@ -92,13 +92,13 @@ define(
var columnsDefinition = (((model.configuration || {}).table || {}).columns || {}),
rows = [];
this.$scope.columnsForm = {
'name':'Columns',
'name': 'Columns',
'sections': [{
'name': 'Columns',
'rows': rows
}]};
Object.keys(columnsDefinition).forEach(function (key){
Object.keys(columnsDefinition).forEach(function (key) {
rows.push({
'name': key,
'control': 'checkbox',

View File

@ -58,7 +58,7 @@ define(
$scope.rows = [];
// Subscribe to telemetry when a domain object becomes available
this.$scope.$watch('domainObject', function(){
this.$scope.$watch('domainObject', function () {
self.subscribe();
self.registerChangeListeners();
});