From f5156174ec262c521d113453e069fb50d8b39fb8 Mon Sep 17 00:00:00 2001 From: kcantrel Date: Tue, 27 Oct 2020 21:46:44 -0700 Subject: [PATCH] addressed @fedarko's comments --- empress/support_files/js/drawer.js | 10 +++++----- tests/test-circular-layout-computation.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/empress/support_files/js/drawer.js b/empress/support_files/js/drawer.js index 6e5eae409..a3f949530 100644 --- a/empress/support_files/js/drawer.js +++ b/empress/support_files/js/drawer.js @@ -1,4 +1,4 @@ -define(["glMatrix", "Camera"], function (gl, Camera) { +define(["underscore", "glMatrix", "Camera"], function (_, gl, Camera) { // Shaders used in Drawer var vertShaderTxt = [ "precision mediump float;", @@ -249,7 +249,7 @@ define(["glMatrix", "Camera"], function (gl, Camera) { * @param {Number} vertSize The size of the vertex for webgl */ Drawer.prototype.bindBuffer = function (buffer, buffType, vertSize) { - if (this.BUFF_TYPES.indexOf(buffType) == -1) { + if (!_.contains(this.BUFF_TYPES, buffType)) { throw "Invalid buffer type"; } @@ -288,9 +288,9 @@ define(["glMatrix", "Camera"], function (gl, Camera) { }; /** - * Fills the buffer used to draw the tree + * Fills the buffer used to draw the tree. * - * @param {Array} data The coordinate and color data to fill tree buffer + * @param {Array} data The coordinates [x, y, ...] to fill treeCoordBuffr */ Drawer.prototype.loadTreeCoordsBuff = function (data) { data = new Float32Array(data); @@ -301,7 +301,7 @@ define(["glMatrix", "Camera"], function (gl, Camera) { /** * Fills the buffer used to draw the tree * - * @param {Array} data The coordinate and color data to fill tree buffer + * @param {Array} data The color data to fill treeColorBuff */ Drawer.prototype.loadTreeColorBuff = function (data) { data = new Float32Array(data); diff --git a/tests/test-circular-layout-computation.js b/tests/test-circular-layout-computation.js index c1cdd9ec9..f89d61d81 100644 --- a/tests/test-circular-layout-computation.js +++ b/tests/test-circular-layout-computation.js @@ -230,7 +230,7 @@ require(["jquery", "BPTree", "BiomTable", "Empress"], function ( // the above calculation can be found at // Empress._numSampToApproximate() ok(Math.abs(coords[250] + 2) < 1.0e-15); // end arc x - ok(Math.abs(coords[251]) < 1.0e-15); + ok(Math.abs(coords[251]) < 1.0e-15); //end arc y }); }); });