Skip to content

Commit

Permalink
fixes custom UI function methods (closes #452)
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed May 31, 2016
1 parent 3a3d2cd commit 015aff4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/viz/helpers/ui/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ module.exports = function( vars ) {
};
}
else {
focus = d.value[0];
focus = d.focus || d.value[0];
if (validObject(focus)) focus = focus[d3.keys(focus)[0]];
if (typeof d.method === "function") {
callback = function(value) {
d.method(value, vars.self);
if (value !== focus) {
focus = value;
d.focus = value;
d.method(value, vars.self);
}
};
}
}
Expand Down

0 comments on commit 015aff4

Please sign in to comment.