Closed platput closed 2 years ago
What appears in the element inspector?
You can see an example of vue3.
Thanks for replying, I tried to figure out the issue in my code by looking at that example as well. But the result was the same. Please see the attached screenshot.
I see that it matters. But in the "Home" there is no data. All data is in "Other".
Try:
editor.changeModule('Other');
Try if not to add a node with "addNode".
Thanks. I tried adding the node with addNode. The item appeared in the element inspector. But it was not viewable in the browser window. Here is my current code inside onMounted:
onMounted(() => {
const id = document.getElementById("canvas");
editor.value = new Drawflow(
id,
Vue,
internalInstance.appContext.app._context
);
editor.value.start();
editor.value.registerNode("NodeOne", NodeOne, {}, {});
editor.value.addNode(
NodeOne,
1,
2,
100,
100,
"node-one",
{},
"NodeOne",
"vue"
);
});
Here is the screenshot of my element tree:
If it is not displayed, it is because you have not defined the height and width in the canvas div. Try adding in the style.
#canvas {
position: relative;
text-align:initial;
width: 100%;
height: 800px;
border: 1px solid red;
}
Thanks a lot, that was the issue.
Hello, I have been trying to make it work on Vue3 without any luck. I feel like I am stuck on something very trivial. Any help would be appreciated. Here is the code. Nothing appears in the ui when I run this except for the background color from the card. There are no errors as well.