Comments (1)
I think I have the same question. I'll explain my concrete use-case below in case that helps with deciding on the relative priority of this issue.
I am attempting to build "probe" nodes whose sole purpose is to observe data at various stages of the logic graph. For example, I want to create a "Probe Audio" node for playing back an audio signal at a specific point:
To do this, I have created a custom Control:
Controls.custom({
name: input.Name,
label: input.Name,
render: (data, onChange, _context, _redraw, _portProps, _controlData) => (
<ProbeAudio src={data} setSrc={onChange}/>
),
})
Where ProbeAudio is defined like this:
import {get_base64_data_from_server} from './server_api';
export default function ProbeAudio({src, setSrc} : {src: string, setSrc: (a: string) => void}){
return (
<div>
<button onClick={()=>{
const my_id = "???" // How do I get the ID of the node that this custom Control belongs to?
const data : string = get_base64_data_from_server(my_id)
setSrc(data);
}}>
Refresh
</button>
<audio src={src} controls={true}/>
</div>
);
}
However, I don't know how to get the ID (or more precisely, the data-node-id attribute) of the Node that the custom Control belongs to. I need it in order to identify the node I want to retrieve the data for (there may be many "Audio Probe" nodes throughout the graph). I can use the nodeEditor ref to get data about all nodes (via nodeEditor.current?.getNodes()), but that doesn't help me identify which node this one is.
I am also not using the Root Engine that comes with Flume; my intention is to execute the logic graph in my own engine on a separate server and then use an API to retrieve the results.
from flume.
Related Issues (20)
- Selectable nodes by drag and drop?
- is this project still in development? HOT 1
- [Question] Vanilla JS usage ? HOT 2
- Type 'string' is not comparable to type 'NodeType' HOT 2
- Support for "any" datatype on ports
- Saving/loading of paths HOT 1
- I can't add nodetypes dynamic
- Clone of version v0.8.2 but version compatibility problem on installation HOT 1
- Bug: Cannot read properties of null (reading 'setAttribute')
- Connecting nodes to already connected input?
- Branching logic
- Getting and setting pan and zoom HOT 1
- Theming documentation missing closing backtick
- Animated connections
- How to actually extract context?
- Rendering custom components in nodes
- Flume for NEXT.js v14 HOT 3
- Support mobile? (ipad)
- Well done! HOT 1
- Inquiry on Project Maintenance Status for Flume HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flume.