(numClicks, evt)
| 246 | } |
| 247 | |
| 248 | function clickFn(numClicks, evt) { |
| 249 | var gd = dragOptions.gd; |
| 250 | if(gd._fullLayout._activeShapeIndex >= 0) { |
| 251 | gd._fullLayout._deactivateShape(gd); |
| 252 | return; |
| 253 | } |
| 254 | |
| 255 | var clickmode = gd._fullLayout.clickmode; |
| 256 | |
| 257 | removeZoombox(gd); |
| 258 | |
| 259 | if(numClicks === 2 && !singleEnd) doubleClick(); |
| 260 | |
| 261 | if(isMainDrag) { |
| 262 | if(clickmode.indexOf('select') > -1) { |
| 263 | selectOnClick(evt, gd, xaxes, yaxes, plotinfo.id, dragOptions); |
| 264 | } |
| 265 | |
| 266 | if(clickmode.indexOf('event') > -1) { |
| 267 | Fx.click(gd, evt, plotinfo.id); |
| 268 | } |
| 269 | } else if(numClicks === 1 && singleEnd) { |
| 270 | var ax = ns ? ya0 : xa0; |
| 271 | var end = (ns === 's' || ew === 'w') ? 0 : 1; |
| 272 | var attrStr = ax._name + '.range[' + end + ']'; |
| 273 | var initialText = getEndText(ax, end); |
| 274 | var hAlign = 'left'; |
| 275 | var vAlign = 'middle'; |
| 276 | |
| 277 | if(ax.fixedrange) return; |
| 278 | |
| 279 | if(ns) { |
| 280 | vAlign = (ns === 'n') ? 'top' : 'bottom'; |
| 281 | if(ax.side === 'right') hAlign = 'right'; |
| 282 | } else if(ew === 'e') hAlign = 'right'; |
| 283 | |
| 284 | if(gd._context.showAxisRangeEntryBoxes) { |
| 285 | d3.select(dragger) |
| 286 | .call(svgTextUtils.makeEditable, { |
| 287 | gd: gd, |
| 288 | immediate: true, |
| 289 | background: gd._fullLayout.paper_bgcolor, |
| 290 | text: String(initialText), |
| 291 | fill: ax.tickfont ? ax.tickfont.color : '#444', |
| 292 | horizontalAlign: hAlign, |
| 293 | verticalAlign: vAlign |
| 294 | }) |
| 295 | .on('edit', function(text) { |
| 296 | var v = ax.d2r(text); |
| 297 | if(v !== undefined) { |
| 298 | Registry.call('_guiRelayout', gd, attrStr, v); |
| 299 | } |
| 300 | }); |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | dragElement.init(dragOptions); |
nothing calls this directly
no test coverage detected
searching dependent graphs…