MCPcopy Index your code
hub / github.com/plotly/plotly.js / zoomClick

Function zoomClick

src/plots/polar/polar.js:1063–1086  ·  view source on GitHub ↗
(numClicks, evt)

Source from the content-addressed store, hash-verified

1061 }
1062
1063 function zoomClick(numClicks, evt) {
1064 var clickMode = gd._fullLayout.clickmode;
1065
1066 dragBox.removeZoombox(gd);
1067
1068 // TODO double once vs twice logic (autorange vs fixed range)
1069 if(numClicks === 2) {
1070 var updateObj = {};
1071 for(var k in _this.viewInitial) {
1072 updateObj[_this.id + '.' + k] = _this.viewInitial[k];
1073 }
1074
1075 gd.emit('plotly_doubleclick', null);
1076 Registry.call('_guiRelayout', gd, updateObj);
1077 }
1078
1079 if(clickMode.indexOf('select') > -1 && numClicks === 1) {
1080 selectOnClick(evt, gd, [_this.xaxis], [_this.yaxis], _this.id, dragOpts);
1081 }
1082
1083 if(clickMode.indexOf('event') > -1) {
1084 Fx.click(gd, evt, _this.id);
1085 }
1086 }
1087
1088 dragOpts.prepFn = function(evt, startX, startY) {
1089 var dragModeNow = gd._fullLayout.dragmode;

Callers

nothing calls this directly

Calls 1

selectOnClickFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…