(d,i)
| 153 | .on('touchend', toggleFootnote) |
| 154 | |
| 155 | function showFootnote(d,i) { |
| 156 | var popup = d3.select(this.parentElement).select(".fn-popup"); |
| 157 | if(!popup.classed("stick") || isMobile) { |
| 158 | popup |
| 159 | .style("opacity", 0) |
| 160 | .style("display", "block") |
| 161 | .transition().duration(300) |
| 162 | .style("opacity", 1); |
| 163 | } |
| 164 | |
| 165 | d3.select(this.parentElement) |
| 166 | .style('position', isMobile ? 'static' : 'relative') |
| 167 | |
| 168 | var bb = this.getBoundingClientRect() |
| 169 | if (isMobile){ |
| 170 | popup |
| 171 | .style('top', bb.top + scrollY + 20 + 'px') |
| 172 | .style('left', 160 + 'px') |
| 173 | } else{ |
| 174 | popup |
| 175 | .style('top', '') |
| 176 | .style('left', '') |
| 177 | } |
| 178 | |
| 179 | |
| 180 | } |
| 181 | |
| 182 | function hideFootnote(d,i) { |
| 183 | var popup = d3.select(this.parentElement).select(".fn-popup"); |
nothing calls this directly
no outgoing calls
no test coverage detected