Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pierre LECHAT
treeWeightD3
Commits
864e2823
Commit
864e2823
authored
Nov 28, 2016
by
Pierre LECHAT
Browse files
if just one condition
parent
450cfd84
Changes
2
Hide whitespace changes
Inline
Side-by-side
R/treeWeightD3.R
View file @
864e2823
...
...
@@ -12,6 +12,7 @@ treeWeightD3 <- function(message, conditions,levels,nodeFind, width = NULL, heig
message
=
message
,
conditions
=
conditions
,
numberConditions
=
length
(
conditions
),
levels
=
levels
,
nodeFind
=
nodeFind
)
...
...
inst/htmlwidgets/treeWeightD3.js
View file @
864e2823
...
...
@@ -20,8 +20,16 @@ HTMLWidgets.widget({
while
(
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
var
menu
=
document
.
createElement
(
"
div
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment