Whitespace fixes

This commit is contained in:
Shay Nehmad 2019-08-25 18:49:57 +03:00
parent 0a044e2295
commit 79fabb1ac1
1 changed files with 2 additions and 7 deletions

View File

@ -85,7 +85,6 @@ class VennDiagram extends React.Component{
document.querySelectorAll('circle, path').forEach((d_, i_) => { d_.setAttribute('opacity', 0.8)}); document.querySelectorAll('circle, path').forEach((d_, i_) => { d_.setAttribute('opacity', 0.8)});
if(e.target.id.includes('Node')) { if(e.target.id.includes('Node')) {
html = e.target.dataset.tooltip; html = e.target.dataset.tooltip;
this.divElement.style.cursor = 'pointer'; this.divElement.style.cursor = 'pointer';
hidden = 'block'; e.target.setAttribute('opacity', 0.95); hidden = 'block'; e.target.setAttribute('opacity', 0.95);
@ -93,14 +92,11 @@ class VennDiagram extends React.Component{
// Set highest z-index // Set highest z-index
e.target.parentNode.parentNode.appendChild(e.target.parentNode); e.target.parentNode.parentNode.appendChild(e.target.parentNode);
} else { } else {
this.divElement.style.cursor = 'default'; this.divElement.style.cursor = 'default';
// Return z indices to default // Return z indices to default
Object.keys(this.layout).forEach(function(d_, i_){ document.querySelector('#' + self.prefix).appendChild(document.querySelector('#' + self.prefix + 'Node_' + i_).parentNode); }) Object.keys(this.layout).forEach(function(d_, i_){ document.querySelector('#' + self.prefix).appendChild(document.querySelector('#' + self.prefix + 'Node_' + i_).parentNode); })
} }
this.setState({target: e, tooltip: { target: e.target, bcolor: bcolor, top: e.clientY + 8, left: e.clientX + 8, display: hidden, html: html } }); this.setState({target: e, tooltip: { target: e.target, bcolor: bcolor, top: e.clientY + 8, left: e.clientX + 8, display: hidden, html: html } });
@ -146,7 +142,6 @@ class VennDiagram extends React.Component{
buildTooltipHtmlContent(object_){ return Object.keys(object_).reduce((out_, key_) => out_ + TypographicUtilities.setTitle(key_) + ': ' + object_[key_] + '\n', ''); } buildTooltipHtmlContent(object_){ return Object.keys(object_).reduce((out_, key_) => out_ + TypographicUtilities.setTitle(key_) + ': ' + object_[key_] + '\n', ''); }
setLayoutElement(rule_, key_, html_, d_) { setLayoutElement(rule_, key_, html_, d_) {
console.log(rule_, key_, html_, d_);
if(rule_ == null) { throw Error('The node scores are invalid'); } if(rule_ == null) { throw Error('The node scores are invalid'); }
if(key_ === 'Data'){ this.layout[key_].fontStyle = this.fontStyles[0]; } if(key_ === 'Data'){ this.layout[key_].fontStyle = this.fontStyles[0]; }