提交 d467815b 编写于 作者: N nem035

added "use strict" to all files that did not have it

上级 b6f42c55
'use strict';
const showLoadingSlider = () => {
$('#loading-slider').removeClass('loaded');
......
'use strict';
const setupDividers = require('./setup_dividers');
const setupDocument = require('./setup_document');
const setupFilesBar = require('./setup_files_bar');
......@@ -10,7 +12,7 @@ const setupTopMenu = require('./setup_top_menu');
const setupWindow = require('./setup_window');
/**
* Initializes elements once the app loads in the DOM.
* Initializes elements once the app loads in the DOM.
*/
const setup = () => {
......@@ -52,4 +54,4 @@ const setup = () => {
module.exports = {
setup
};
\ No newline at end of file
};
'use strict';
const app = require('../../app');
const addDividerToDom = (divider) => {
......@@ -96,4 +98,4 @@ module.exports = () => {
for (let i = 0; i < dividers.length; i++) {
addDividerToDom(dividers[i]);
}
}
\ No newline at end of file
}
'use strict';
const app = require('../../app');
module.exports = () => {
......@@ -11,4 +13,4 @@ module.exports = () => {
$(document).mouseup(function (e) {
app.getTracerManager().command('mouseup', e);
});
};
\ No newline at end of file
};
'use strict';
const definitelyBigger = (x, y) => x > (y + 2);
module.exports = () => {
......@@ -54,4 +56,4 @@ module.exports = () => {
$('.files_bar > .btn-left').attr('disabled', !lefter);
$('.files_bar > .btn-right').attr('disabled', !righter);
});
}
\ No newline at end of file
}
'use strict';
const app = require('../../app');
const Toast = require('../toast');
......@@ -47,4 +49,4 @@ module.exports = () => {
tracerManager.interval = seconds * 1000;
Toast.showInfoToast(message);
});
};
\ No newline at end of file
};
'use strict';
const app = require('../../app');
module.exports = () => {
......@@ -15,4 +17,4 @@ module.exports = () => {
$module_container.on('DOMMouseScroll mousewheel', '.module_wrapper', function(e) {
app.getTracerManager().findOwner(this).mousewheel(e);
});
}
\ No newline at end of file
}
'use strict';
module.exports = () => {
$('#powered-by').click(function() {
$('#powered-by-list button').toggleClass('collapse');
});
};
\ No newline at end of file
};
'use strict';
const app = require('../../app');
const Server = require('../../server');
const showAlgorithm = require('../show_algorithm');
......@@ -10,4 +12,4 @@ module.exports = () => {
showAlgorithm(category, algorithm, data);
});
});
};
\ No newline at end of file
};
'use strict';
const app = require('../../app');
let sidemenu_percent;
......@@ -22,4 +24,4 @@ module.exports = () => {
app.getTracerManager().resize();
});
}
\ No newline at end of file
}
'use strict';
const app = require('../../app');
const Server = require('../../server');
const Toast = require('../toast');
......
'use strict';
const app = require('../../app');
module.exports = function() {
$(window).resize(function() {
app.getTracerManager().resize();
});
};
\ No newline at end of file
};
'use strict';
const Array2D = require('./array2d');
const random = (N, min, max) => {
......
'use strict';
const random = (N, M, min, max) => {
if (!N) N = 10;
if (!M) M = 10;
......@@ -24,4 +26,4 @@ const randomSorted = (N, M, min, max) => {
module.exports = {
random,
randomSorted
};
\ No newline at end of file
};
'use strict';
const random = (N, min, max) => {
if (!N) N = 7;
if (!min) min = 1;
......@@ -12,4 +14,4 @@ const random = (N, min, max) => {
module.exports = {
random
};
\ No newline at end of file
};
'use strict';
const random = (N, ratio) => {
if (!N) N = 5;
if (!ratio) ratio = .3;
......@@ -15,4 +17,4 @@ const random = (N, ratio) => {
module.exports = {
random
};
\ No newline at end of file
};
'use strict';
const random = (N, ratio) => {
if (!N) N = 5;
if (!ratio) ratio = .3;
......@@ -15,4 +17,4 @@ const random = (N, ratio) => {
module.exports = {
random
};
\ No newline at end of file
};
'use strict';
const random = (N, ratio, min, max) => {
if (!N) N = 5;
if (!ratio) ratio = .3;
......@@ -17,4 +19,4 @@ const random = (N, ratio, min, max) => {
module.exports = {
random
};
\ No newline at end of file
};
'use strict';
const random = (N, ratio, min, max) => {
if (!N) N = 5;
if (!ratio) ratio = .3;
......@@ -17,4 +19,4 @@ const random = (N, ratio, min, max) => {
module.exports = {
random
};
\ No newline at end of file
};
'use strict';
const Array2DTracer = require('./array2d');
class Array1DTracer extends Array2DTracer {
......@@ -42,4 +44,4 @@ class Array1DTracer extends Array2DTracer {
}
}
module.exports = Array1DTracer;
\ No newline at end of file
module.exports = Array1DTracer;
'use strict';
const Tracer = require('./tracer');
const {
......@@ -335,4 +337,4 @@ const initView = (tracer) => {
tracer.$container.append(tracer.$table);
};
module.exports = Array2DTracer;
\ No newline at end of file
module.exports = Array2DTracer;
'use strict';
const Tracer = require('./tracer');
class ChartTracer extends Tracer {
......@@ -135,4 +137,4 @@ const initView = (tracer) => {
});
};
module.exports = ChartTracer;
\ No newline at end of file
module.exports = ChartTracer;
'use strict';
const DirectedGraphTracer = require('./directed_graph');
class CoordinateSystemTracer extends DirectedGraphTracer {
......@@ -137,4 +139,4 @@ const initView = (tracer) => {
});
};
module.exports = CoordinateSystemTracer;
\ No newline at end of file
module.exports = CoordinateSystemTracer;
'use strict';
const Tracer = require('./tracer');
const {
......@@ -398,4 +400,4 @@ sigma.canvas.edges.arrow = function (edge, source, target, context, settings) {
}
};
module.exports = DirectedGraphTracer;
\ No newline at end of file
module.exports = DirectedGraphTracer;
'use strict';
const Tracer = require('./tracer');
class LogTracer extends Tracer {
......@@ -53,4 +55,4 @@ const initView = (tracer) => {
tracer.$container.append(tracer.$wrapper);
};
module.exports = LogTracer;
\ No newline at end of file
module.exports = LogTracer;
'use strict';
const app = require('../../app');
const {
......@@ -9,7 +11,7 @@ class Tracer {
static getClassName() {
return 'Tracer';
}
constructor(name) {
this.module = this.constructor;
......@@ -105,4 +107,4 @@ class Tracer {
}
}
module.exports = Tracer;
\ No newline at end of file
module.exports = Tracer;
'use strict';
const DirectedGraphTracer = require('./directed_graph');
class UndirectedGraphTracer extends DirectedGraphTracer {
......@@ -80,4 +82,4 @@ const initView = (tracer) => {
});
};
module.exports = UndirectedGraphTracer;
\ No newline at end of file
module.exports = UndirectedGraphTracer;
'use strict';
const DirectedGraphTracer = require('./directed_graph');
const {
......@@ -193,4 +195,4 @@ const initView = (tracer) => {
});
};
module.exports = WeightedDirectedGraphTracer;
\ No newline at end of file
module.exports = WeightedDirectedGraphTracer;
'use strict';
const WeightedDirectedGraphTracer = require('./weighted_directed_graph');
const UndirectedGraphTracer = require('./undirected_graph');
......@@ -46,4 +48,4 @@ const initView = (tracer) => {
});
};
module.exports = WeightedUndirectedGraphTracer;
\ No newline at end of file
module.exports = WeightedUndirectedGraphTracer;
'use strict';
const {
parse
} = JSON;
......@@ -8,4 +10,4 @@ const fromJSON = (obj) => {
});
};
module.exports = fromJSON;
\ No newline at end of file
module.exports = fromJSON;
'use strict';
const toJSON = require('./to_json');
const fromJSON = require('./from_json');
const refineByType = require('./refine_by_type');
......@@ -6,4 +8,4 @@ module.exports = {
toJSON,
fromJSON,
refineByType
};
\ No newline at end of file
};
'use strict';
const refineByType = (item) => {
switch (typeof(item)) {
case 'number':
......
'use strict';
const {
stringify
} = JSON;
......@@ -8,4 +10,4 @@ const toJSON = (obj) => {
});
};
module.exports = toJSON;
\ No newline at end of file
module.exports = toJSON;
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册