-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add CT body * Add resultCT * lint * Rename CT to 3D_datafile_CT * Change dimension to 3 * Rename CT to 3D * Update src/JsRoot/GraphData.tsx Co-authored-by: Jakub Niechaj <quban123@gmail.com> * Apply suggestions from code review Co-authored-by: Jakub Niechaj <quban123@gmail.com> --------- Co-authored-by: Jakub Niechaj <quban123@gmail.com>
- Loading branch information
Showing
12 changed files
with
198 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
38 changes: 38 additions & 0 deletions
38
src/ThreeEditor/components/Sidebar/propeteries/category/CTConfiguration.tsx
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,38 @@ | ||
import { Object3D } from 'three'; | ||
import { SetValueCommand } from '../../../../js/commands/SetValueCommand'; | ||
import { Editor } from '../../../../js/Editor'; | ||
import { TextPropertyField } from '../fields/PropertyField'; | ||
import { useSmartWatchEditorState } from '../../../../util/hooks/signals'; | ||
import { PropertiesCategory } from './PropertiesCategory'; | ||
import { isCTMesh } from '../../../../util/BasicMeshes'; | ||
|
||
export function CTConfiguration(props: { editor: Editor; object: Object3D }) { | ||
const { object, editor } = props; | ||
|
||
const { state: watchedObject } = useSmartWatchEditorState(editor, object); | ||
|
||
const visibleFlag = isCTMesh(watchedObject); | ||
|
||
return ( | ||
<PropertiesCategory category='CT Configuration' visible={visibleFlag}> | ||
{visibleFlag && ( | ||
<> | ||
<TextPropertyField | ||
label='Path on server' | ||
value={watchedObject.pathOnServer} | ||
onChange={value => { | ||
editor.execute( | ||
new SetValueCommand( | ||
editor, | ||
watchedObject.object, | ||
'pathOnServer', | ||
value | ||
) | ||
); | ||
}} | ||
/> | ||
</> | ||
)} | ||
</PropertiesCategory> | ||
); | ||
} |
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
Oops, something went wrong.