Skip to content

Commit 83f70b6

Browse files
committed
function call when clicking barchart bar
1 parent 05ec50e commit 83f70b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Clojure-Websockets/resources/public/js/barchart.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ var BirdWatch = BirdWatch || {};
5757
this.setState({ratioArrDir: (ratioSlope > 0) ? "RIGHT-UP" : "RIGHT-DOWN"});
5858
},
5959
/** adding terms to the search bar when clicking on any of the bars */
60-
clickHandler: function(e) { BirdWatch.addSearchTerm(this.props.key); },
60+
clickHandler: function(e) { birdwatch.core.append_search_text(this.props.key); },
6161
render: function () {
6262
var y = parseInt(this.props.y);
6363
var t = this.props.t;
64+
var termWeight = "normal";
6465
var w = parseInt(this.props.w);
6566
var val = this.props.val;
6667

@@ -69,7 +70,7 @@ var BirdWatch = BirdWatch || {};
6970
if (w < 50) { style.fill="#999"; textX+=26; style.textAnchor="start"; style.fontWeight=400}
7071

7172
return React.DOM.g( {onClick:this.clickHandler},
72-
React.DOM.text( {y:y+8, x:"137", stroke:"none", fill:"black", dy:".35em", textAnchor:"end"}, t),
73+
React.DOM.text( {y:y+8, x:"137", stroke:"none", fill:"black", dy:".35em", textAnchor:"end"}, t),
7374
Arrow( {dir:this.state.posArrDir, y:y, x:146} ),
7475
Arrow( {dir:this.state.ratioArrDir, y:y, x:160} ),
7576
React.DOM.rect( {y:y, x:"168", height:"15", width:w, stroke:"white", fill:"#428bca"}),

0 commit comments

Comments
 (0)