(gd, path)
| 725 | } |
| 726 | |
| 727 | function activateShape(gd, path) { |
| 728 | if (!couldHaveActiveShape(gd)) return; |
| 729 | |
| 730 | var element = path.node(); |
| 731 | var id = +element.getAttribute('data-index'); |
| 732 | if (id >= 0) { |
| 733 | // deactivate if already active |
| 734 | if (id === gd._fullLayout._activeShapeIndex) { |
| 735 | deactivateShape(gd); |
| 736 | return; |
| 737 | } |
| 738 | |
| 739 | gd._fullLayout._activeShapeIndex = id; |
| 740 | gd._fullLayout._deactivateShape = deactivateShape; |
| 741 | draw(gd); |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | function deactivateShape(gd) { |
| 746 | if (!couldHaveActiveShape(gd)) return; |
no test coverage detected
searching dependent graphs…