Files
JiboSDK/lib/robot-info-tab/views/body-pane.js
2026-03-22 03:21:45 +02:00

1 line
1.5 KiB
JavaScript

"use strict";var t=function(t){return t&&t.__esModule?t["default"]:t},e=t(require("react")),a=t(require("./body-view")),i=t(require("./button-group")),o=t(require("./streaming-graph-view"));module.exports=e.createClass({displayName:"body-pane",getInitialState:function(){return{showExpected:!1}},render:function(){var t=JSON.parse(JSON.stringify(this.props.data));return t["Commanded Pelvis Rotation"]={name:"Commanded Pelvis Rotation",id:3,isVisible:this.state.showExpected&&this.props.data["Pelvis Rotation"].isVisible,data:this.props.data["Pelvis Rotation"].state.ref},t["Commanded Torso Rotation"]={name:"Commanded Torso Rotation",id:4,isVisible:this.state.showExpected&&this.props.data["Torso Rotation"].isVisible,data:this.props.data["Torso Rotation"].state.ref},t["Commanded Head Rotation"]={name:"Commanded Head Rotation",id:5,isVisible:this.state.showExpected&&this.props.data["Head Rotation"].isVisible,data:this.props.data["Head Rotation"].state.ref},e.createElement("div",null,e.createElement(i,{data:this.props.data,onChangeConfiguration:this.props.onChangeConfiguration,toggleShowExpected:this.toggleShowExpected}),e.createElement(o,{ref:"graph-container",parent:this.props.parent,groups:t,intervalLength:10,title:"Velocity",dataAxis:"Axis Velocity"}),e.createElement("div",{style:{width:"50%","float":"left"}},e.createElement(a,{ref:"bodyView",parent:this.props.parent,lpsService:this.props.lpsService,intervalLength:this.props.intervalLength})))},toggleShowExpected:function(){this.setState({showExpected:!this.state.showExpected})}});