From 1a19ce435b6675c960eb3c5fb59b0ee05fcc5865 Mon Sep 17 00:00:00 2001 From: Jason Park <parkjs814@gmail.com> Date: Fri, 20 May 2016 12:25:17 -0500 Subject: [PATCH] minor --- js/module/array1d.js | 4 ++-- js/module/array2d.js | 4 ++-- js/module/graph.js | 6 +++--- js/module/weighted_graph.js | 4 ++-- js/tracer.js | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/js/module/array1d.js b/js/module/array1d.js index f204bcd..839c11f 100644 --- a/js/module/array1d.js +++ b/js/module/array1d.js @@ -12,8 +12,8 @@ var Array1D = { }; // Override -Array1DTracer.prototype.setData = function (D) { - return Array2DTracer.prototype.setData.call(this, [D]); +Array1DTracer.prototype._setData = function (D) { + return Array2DTracer.prototype._setData.call(this, [D]); }; // Override diff --git a/js/module/array2d.js b/js/module/array2d.js index cf4f261..107cf8d 100644 --- a/js/module/array2d.js +++ b/js/module/array2d.js @@ -43,14 +43,14 @@ var Array2D = { }; // Override -Array2DTracer.prototype.setData = function (D) { +Array2DTracer.prototype._setData = function (D) { this.D = D; this.viewX = this.viewY = 0; this.paddingH = 6; this.paddingV = 3; this.fontSize = 16; - if (Tracer.prototype.setData.call(this, arguments)) { + if (Tracer.prototype._setData.call(this, arguments)) { $('.mtbl-row').each(function (i) { $(this).children().each(function (j) { $(this).text(D[i][j]); diff --git a/js/module/graph.js b/js/module/graph.js index e6cf2cc..6b737a8 100644 --- a/js/module/graph.js +++ b/js/module/graph.js @@ -57,7 +57,7 @@ GraphTracer.prototype.setTreeData = function (G, root) { }; getDepth(root, 1); - if (this.setData(G, root)) return true; + if (this._setData(G, root)) return true; var place = function (node, x, y) { var temp = graph.nodes(n(node)); @@ -84,8 +84,8 @@ GraphTracer.prototype.setTreeData = function (G, root) { }; // Override -GraphTracer.prototype.setData = function (G) { - if (Tracer.prototype.setData.call(this, arguments)) return true; +GraphTracer.prototype._setData = function (G) { + if (Tracer.prototype._setData.call(this, arguments)) return true; graph.clear(); var nodes = []; diff --git a/js/module/weighted_graph.js b/js/module/weighted_graph.js index 6b6f2cb..ef02ee3 100644 --- a/js/module/weighted_graph.js +++ b/js/module/weighted_graph.js @@ -39,8 +39,8 @@ var WeightedGraph = { }; // Override -WeightedGraphTracer.prototype.setData = function (G) { - if (Tracer.prototype.setData.call(this, arguments)) return true; +WeightedGraphTracer.prototype._setData = function (G) { + if (Tracer.prototype._setData.call(this, arguments)) return true; graph.clear(); var nodes = []; diff --git a/js/tracer.js b/js/tracer.js index 32e23c0..a0ba993 100644 --- a/js/tracer.js +++ b/js/tracer.js @@ -30,7 +30,7 @@ Tracer.prototype.reset = function () { Tracer.prototype.createRandomData = function (arguments) { }; -Tracer.prototype.setData = function (arguments) { +Tracer.prototype._setData = function (arguments) { var data = JSON.stringify(arguments); if (lastModule == this.module && lastData == data) return true; lastData = data; -- GitLab