MCPcopy Index your code
hub / github.com/plotly/plotly.py / do_moveTraces

Method do_moveTraces

js/src/widget.ts:1388–1405  ·  view source on GitHub ↗

* Handle Plotly.moveTraces request

()

Source from the content-addressed store, hash-verified

1386 * Handle Plotly.moveTraces request
1387 */
1388 do_moveTraces() {
1389 /** @type {Py2JsMoveTracesMsg} */
1390 var msgData: Py2JsMoveTracesMsg = this.model.get("_py2js_moveTraces");
1391
1392 if (msgData !== null) {
1393 // Unpack message
1394 var currentInds = msgData.current_trace_inds;
1395 var newInds = msgData.new_trace_inds;
1396
1397 // Check if the new trace indexes are actually different than
1398 // the current indexes
1399 var inds_equal = _.isEqual(currentInds, newInds);
1400
1401 if (!inds_equal) {
1402 Plotly.moveTraces(this.el, currentInds, newInds);
1403 }
1404 }
1405 }
1406
1407 /**
1408 * Handle Plotly.restyle request

Callers 1

perform_renderMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected