generated from allen-cell-animated/github-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
send selected agent data to front end (#392)
* basic metadata features started * add null agent constant * remove comment from selection interface * create method in visgeo to get agent data from follow object * add viewport method updateFollowObjectData * remove unused controller code * fix whitespace * move addpathforagent back inside lockedcamera block * create metadata component for test bed * use NULL_AGENT in constructor * generalize to getObjectData from getFollowObjectData
- Loading branch information
Showing
6 changed files
with
103 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from "react"; | ||
import { AgentData } from "../../type-declarations/simularium/types"; | ||
|
||
interface AgentMetadataProps { | ||
agentData: AgentData; | ||
} | ||
|
||
const AgentMetadata = ({ agentData }: AgentMetadataProps): JSX.Element => { | ||
|
||
const getContents = () => { | ||
if (agentData.instanceId === -1) { | ||
return <div>No agent selected</div>; | ||
} | ||
return ( | ||
<div> | ||
<div> uniqueID: {agentData.instanceId}</div> | ||
<div> agentType: {agentData.type}</div> | ||
<div> | ||
position: x = {agentData.x}, y = {agentData.y}, z = | ||
{agentData.z} | ||
</div> | ||
<div> | ||
rotation: x = {agentData.xrot}, y = {agentData.yrot}, z = | ||
{agentData.zrot} | ||
</div> | ||
<div> radius: {agentData.cr}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
return <div>Agent Metadata: {getContents()}</div>; | ||
}; | ||
|
||
export default AgentMetadata; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters