Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 81227

SDK - position MicroflowObjects in Microflow

$
0
0

How do I position things in microflows? I am able to create an InputParameter, StartEvent, EndEvent and three CreateVariable activities, and the proper SequenceFlows between them, however, they are all placed on top of eachother.

Currently, I am doing the following (summarized):

let mf = microflows.Microflow.createIn(module);
let objCol = microflows.MicroflowObjectCollection.createInMicroflowBaseUnderObjectCollection(mf);
let action = microflows.ActionActivity.createIn(objCol);
const coordinates = getCoordinatesForMicroflow(microflowToAdd, activity, 1);
action.relativeMiddlePoint.x = coordinates.width;
action.relativeMiddlePoint.y = coordinates.height;
console.log('DEBUG: ' + action.qualifiedName + ' @ ' + action.relativeMiddlePoint.x + ', ' + action.relativeMiddlePoint.y);
action.size.height = 60;
action.size.width = 120;
let createVariable = microflows.CreateVariableAction.createIn(action);

The debug message returns different coordinates for each MicroflowObject, but the modeler does not seem to recognize this.


Viewing all articles
Browse latest Browse all 81227

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>