Added workflow image export for possible visualization optimizations

This commit is contained in:
frikky
2022-01-29 02:02:59 +01:00
parent 961d56e52b
commit 8e10dc7cad
+15
View File
@@ -1112,6 +1112,21 @@ const AngularWorkflow = (defaultprops) => {
useworkflow.errors = []; useworkflow.errors = [];
useworkflow.previously_saved = true; useworkflow.previously_saved = true;
if (cy !== undefined) {
// scale: 0.3,
// bg: "#27292d",
const cyImageData = cy.png({
output: "base64uri",
maxWidth: 480,
maxHeight: 270,
})
console.log("CY: ", cyImageData)
if (cyImageData !== undefined && cyImageData !== null && cyImageData.length > 0) {
useworkflow.image = cyImageData
}
}
setLastSaved(true); setLastSaved(true);
fetch(globalUrl + "/api/v1/workflows/" + props.match.params.key, { fetch(globalUrl + "/api/v1/workflows/" + props.match.params.key, {
method: "PUT", method: "PUT",