From 0af283db217043a3fc948997e26046f8f7cc8016 Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 29 Jun 2024 18:10:38 -0400 Subject: [PATCH] update sampleLegend.show documentation --- README.md | 2 +- jscomut.js | 2 +- jscomutdemo.js | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 171257d..5dc250d 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ default_options = { sampleLegend:{ height: 100, - show:'yes',//if not 'yes' a scale of zero will hide the labels + show: true, //if false (or falsey) a scale of zero will hide the labels }, //colorLegend: defines the width of the legend of cell colors to the right of the grid. diff --git a/jscomut.js b/jscomut.js index d6bc06c..662ce3c 100755 --- a/jscomut.js +++ b/jscomut.js @@ -177,7 +177,7 @@ function Comut() { .append('g') .attr('class', 'sample-legend') .attr('transform', 'translate(0,' + (o-options.innerLayout.margins) + ')' + - ' scale(1,' + (options.sampleLegend.show=='yes'?1:0) + ')'); + ' scale(1,' + (options.sampleLegend.show ? 1 : 0) + ')'); _this.colorLegend = _this.svg .append('g') diff --git a/jscomutdemo.js b/jscomutdemo.js index 8fa3738..f01a1fd 100755 --- a/jscomutdemo.js +++ b/jscomutdemo.js @@ -2,6 +2,10 @@ $(document).ready(function(){ var comut = new Comut(); comut.init({ target: '#widget', + sampleLegend:{ + height: 200, + show: false, //if falsey a scale of zero will hide the labels + }, }); $('