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

Method buildInputDeviceStateObject

js/src/widget.ts:1121–1140  ·  view source on GitHub ↗

* Build InputDeviceState data structure from data supplied by the * plotly_click, plotly_hover, or plotly_select events * @param {Object} data * @returns {null|InputDeviceState}

(data: any)

Source from the content-addressed store, hash-verified

1119 * @returns {null|InputDeviceState}
1120 */
1121 buildInputDeviceStateObject(data: any): null | InputDeviceState {
1122 var event = data["event"];
1123 if (event === undefined) {
1124 return null;
1125 } else {
1126 /** @type {InputDeviceState} */
1127 var inputDeviceState: InputDeviceState = {
1128 // Keyboard modifiers
1129 alt: event["altKey"],
1130 ctrl: event["ctrlKey"],
1131 meta: event["metaKey"],
1132 shift: event["shiftKey"],
1133
1134 // Mouse buttons
1135 button: event["button"],
1136 buttons: event["buttons"],
1137 };
1138 return inputDeviceState;
1139 }
1140 }
1141
1142 /**
1143 * Build Selector data structure from data supplied by the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected