Skip to content
Snippets Groups Projects
Commit 90b93151 authored by Christopher Pietsch's avatar Christopher Pietsch
Browse files

changed config to local var

parent cb6f5766
No related branches found
No related tags found
No related merge requests found
......@@ -27,13 +27,11 @@ function Tags() {
var lock = false;
var state = { init: false, search: '' };
var mouseenterCallback = function(){};
function tags(){ }
tags.state = state
tags.init = function(_data) {
tags.init = function(_data, config) {
data = _data;
container = d3.select(".page").append("div")
......@@ -243,11 +241,10 @@ function Tags() {
tags.highlightWords(filterWords);
setTimeout(function(){
mouseclickCallback(d);
canvas.project(d);
},300);
lock = false
}
tags.mouseleave = function (d) {
......@@ -259,7 +256,7 @@ function Tags() {
data.forEach(function(d){ d.highlight = d.active; })
mouseenterCallback();
canvas.highlight();
}
tags.mouseenter = function (d1) {
......@@ -282,7 +279,7 @@ function Tags() {
return d.values.some(function(d){ return d.active; }) ? 1 : 0.2;
})
mouseenterCallback();
canvas.highlight();
}
tags.highlightWords = function(words){
......@@ -295,7 +292,7 @@ function Tags() {
return d.values.some(function(d){ return d.highlight; }) ? 1 : 0.2;
})
mouseenterCallback();
canvas.highlight();
}
tags.search = function(query){
......@@ -308,18 +305,6 @@ function Tags() {
canvas.project()
}
tags.mouseenterCallback = function(callback){
mouseenterCallback = callback;
}
tags.mouseclickCallback = function(callback){
mouseclickCallback = callback;
}
return tags;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment