提交 d467815b 编写于 作者: N nem035

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

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