(gd, path)
| 153 | |
| 154 | |
| 155 | function activateSelection(gd, path) { |
| 156 | if(!couldHaveActiveSelection(gd)) return; |
| 157 | |
| 158 | var element = path.node(); |
| 159 | var id = +element.getAttribute('data-index'); |
| 160 | if(id >= 0) { |
| 161 | // deactivate if already active |
| 162 | if(id === gd._fullLayout._activeSelectionIndex) { |
| 163 | deactivateSelection(gd); |
| 164 | return; |
| 165 | } |
| 166 | |
| 167 | gd._fullLayout._activeSelectionIndex = id; |
| 168 | gd._fullLayout._deactivateSelection = deactivateSelection; |
| 169 | draw(gd); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | function activateLastSelection(gd) { |
| 174 | if(!couldHaveActiveSelection(gd)) return; |
no test coverage detected
searching dependent graphs…