Added data edited event
This commit is contained in:
parent
ab40c321a3
commit
1428502706
@ -202,6 +202,7 @@ export default {
|
||||
saveEdit() {
|
||||
this.show.editor = false;
|
||||
this.$emit('update:data', this.editorData);
|
||||
this.$emit("dataUpdated", this.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,10 @@
|
||||
:options="nodeOptions"
|
||||
@linkingStart="linkingStart(node.id)"
|
||||
@linkingStop="linkingStop(node.id)"
|
||||
@nodeSelected="nodeSelected(node.id, $event)">
|
||||
@nodeSelected="nodeSelected(node.id, $event)"
|
||||
@dataUpdated="dataUpdated(node.id, $event)"
|
||||
>
|
||||
|
||||
</flowchart-node>
|
||||
|
||||
</div>
|
||||
@ -127,8 +130,7 @@ export default {
|
||||
// Line start and end points set here
|
||||
if (type === 'top') {
|
||||
return [x + 100, y];
|
||||
}
|
||||
else if (type === 'bottom') {
|
||||
} else if (type === 'bottom') {
|
||||
return [x + 100, y + 150];
|
||||
}
|
||||
},
|
||||
@ -256,6 +258,9 @@ export default {
|
||||
return link.from !== id && link.to !== id
|
||||
})
|
||||
this.$emit('nodeDelete', id)
|
||||
},
|
||||
dataUpdated(id, newData) {
|
||||
this.$emit('nodeDataEdited', id, newData);
|
||||
}
|
||||
},
|
||||
}
|
||||
@ -269,6 +274,7 @@ export default {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
|
||||
svg {
|
||||
cursor: grab;
|
||||
}
|
||||
|
@ -40,36 +40,8 @@ export default {
|
||||
centerX: 0,
|
||||
centerY: 0,
|
||||
scale: 1,
|
||||
nodes: [
|
||||
{
|
||||
id: 2,
|
||||
x: 100,
|
||||
y: 110,
|
||||
type: 'ingest',
|
||||
data: {"url": "rtmp://videon.test.kmlabz.com/test:6554"},
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
x: 357,
|
||||
y: 80,
|
||||
type: 'restreamer',
|
||||
data: {"url": "rtmp://youtube.com/live/stream/ysos:55223", "streamkey": "asdjnao9gj9833tjkq389fjae9jf"},
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
x: 557,
|
||||
y: 80,
|
||||
type: 'encoder',
|
||||
data: {"bitrate": 8000, "width": 600, "height": 800}
|
||||
}
|
||||
],
|
||||
links: [
|
||||
{
|
||||
id: 1,
|
||||
from: 2, // node id the link start
|
||||
to: 4, // node id the link end
|
||||
}
|
||||
]
|
||||
nodes: [],
|
||||
links: []
|
||||
}
|
||||
}),
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user