Commit 864e2823 authored by Pierre  LECHAT's avatar Pierre LECHAT
Browse files

if just one condition

parent 450cfd84
...@@ -12,6 +12,7 @@ treeWeightD3 <- function(message, conditions,levels,nodeFind, width = NULL, heig ...@@ -12,6 +12,7 @@ treeWeightD3 <- function(message, conditions,levels,nodeFind, width = NULL, heig
message = message, message = message,
conditions = conditions, conditions = conditions,
numberConditions = length(conditions),
levels = levels, levels = levels,
nodeFind = nodeFind nodeFind = nodeFind
) )
......
...@@ -20,8 +20,16 @@ HTMLWidgets.widget({ ...@@ -20,8 +20,16 @@ HTMLWidgets.widget({
while (el.firstChild) { while (el.firstChild) {
el.removeChild(el.firstChild); el.removeChild(el.firstChild);
} }
var conditions;
var conditions = x.conditions; // if one condition
if(x.numberConditions == 1){
alert("numberConditions == 1");
conditions =new Array (x.conditions);
}
else{
conditions = x.conditions;
}
// Create Condition Menu // Create Condition Menu
var menu = document.createElement("div"); var menu = document.createElement("div");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment