* Handle plotly_relayout events emitted by the Plotly.js library * @param data
(data: any)
| 1212 | * @param data |
| 1213 | */ |
| 1214 | handle_plotly_relayout(data: any) { |
| 1215 | if (data === null || data === undefined) { |
| 1216 | // No data to report to the Python side |
| 1217 | return; |
| 1218 | } |
| 1219 | |
| 1220 | if (data.hasOwnProperty("_doNotReportToPy")) { |
| 1221 | // Relayout originated on the Python side |
| 1222 | return; |
| 1223 | } |
| 1224 | |
| 1225 | /** @type {Js2PyRelayoutMsg} */ |
| 1226 | var relayoutMsg: Js2PyRelayoutMsg = { |
| 1227 | relayout_data: data, |
| 1228 | source_view_id: this.viewID, |
| 1229 | }; |
| 1230 | |
| 1231 | this.model.set("_js2py_relayout", relayoutMsg); |
| 1232 | this.touch(); |
| 1233 | } |
| 1234 | |
| 1235 | /** |
| 1236 | * Handle plotly_update events emitted by the Plotly.js library |
no test coverage detected