Skip to content
Snippets Groups Projects

Master

Merged Peter Zhai requested to merge master into release
2 files
+ 97
23
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 19
3
@@ -164,6 +164,10 @@ var cqhm = cqhm || {};
new cqhm.modelTypes.DynamicEvent({
position: { x: 25, y: 85 },
size: { width: 25, height: 25 }
}),
new cqhm.modelTypes.Agent({
position: { x: 25, y: 100 },
size: { width: 40, height: 90 }
})
]);
@@ -792,7 +796,7 @@ var cqhm = cqhm || {};
cqhm.modelBridge._newRealtimeObjFromJointjsObj = function(jointjsCell) {
var newRtElem = dataHandler.realtime.getBaseElemStructure();
var type = jointjsCell.get("type");
if (_.contains(["cqhm.Stock", "cqhm.Cloud", "cqhm.FinalState", "cqhm.Branch", "cqhm.StatechartEntryPoint","cqhm.State", "cqhm.Parameter","cqhm.Event", "cqhm.DynamicEvent"], type)) {
if (_.contains(["cqhm.Stock", "cqhm.Cloud", "cqhm.FinalState", "cqhm.Branch", "cqhm.StatechartEntryPoint","cqhm.State", "cqhm.Parameter","cqhm.Event", "cqhm.DynamicEvent", "cqhm.Agent"], type)) {
var position = jointjsCell.get("position");
newRtElem.set("position.x", position.x);
newRtElem.set("position.y", position.y);
@@ -841,7 +845,7 @@ var cqhm = cqhm || {};
var params = {
id: realtimeModelObj.get("id")
};
if (_.contains(["cqhm.Stock", "cqhm.Cloud", "cqhm.FinalState", "cqhm.Branch", "cqhm.StatechartEntryPoint", "cqhm.State", "cqhm.Parameter", "cqhm.Event", "cqhm.DynamicEvent"], cellType)) {
if (_.contains(["cqhm.Stock", "cqhm.Cloud", "cqhm.FinalState", "cqhm.Branch", "cqhm.StatechartEntryPoint", "cqhm.State", "cqhm.Parameter", "cqhm.Event", "cqhm.DynamicEvent", "cqhm.Agent"], cellType)) {
params.position = {
x: realtimeModelObj.get("position.x"),
y: realtimeModelObj.get("position.y")
@@ -850,6 +854,16 @@ var cqhm = cqhm || {};
width: realtimeModelObj.get("size.width"),
height: realtimeModelObj.get("size.height")
};
// } else if (_.contains(["cqhm.Agent"], cellType)) {
// params.position = {
// x: realtimeModelObj.get("position.x"),
// y: realtimeModelObj.get("position.y")
// };
// params.size = {
// width: realtimeModelObj.get("size.width")*10,
// height: realtimeModelObj.get("size.height")*10
// };
} else if (_.contains(["cqhm.Flow", "cqhm.StateTransition", "cqhm.StateTransitionTrue", "cqhm.StateTransitionFalse", "cqhm.CausalConnectionPositive"], cellType)) {
params.source = {};
params.target = {};
@@ -896,7 +910,9 @@ var cqhm = cqhm || {};
newCell = new cqhm.modelTypes.Event(params);
} else if ("cqhm.DynamicEvent" == cellType) {
newCell = new cqhm.modelTypes.DynamicEvent(params);
}else {
} else if ("cqhm.Agent" == cellType) {
newCell = new cqhm.modelTypes.Agent(params);
} else {
dev.error(3, "The type '" + cellType + "' is not handled in the modelBridge._newJointjsObjFromRealtimeObj function!");
}
Loading