* Handle Plotly.moveTraces request
()
| 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 |