Skip to content

Commit 001304c

Browse files
committed
fix radius expression
1 parent 70957ad commit 001304c

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

StencilBuilder/Definition.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
info.valueLiteral = this.getProperty(propName + "Expression").value;
5353
info.realValueLiteral = info.valueLiteral;
5454
55+
if (behaviorNames) for (var behaviorName of behaviorNames.split(",")) contribution.addBehavior(targetElementName, behaviorName, [expressionConverter ? expressionConverter(info.valueLiteral) : info.valueLiteral]);
56+
return info;
57+
} else if (mode.match(/^\$.+/)) {
58+
info.valueLiteral = mode;
59+
info.realValueLiteral = info.valueLiteral;
60+
5561
if (behaviorNames) for (var behaviorName of behaviorNames.split(",")) contribution.addBehavior(targetElementName, behaviorName, [expressionConverter ? expressionConverter(info.valueLiteral) : info.valueLiteral]);
5662
return info;
5763
} else {
@@ -770,7 +776,7 @@
770776
contribution = parentAction.implFunction.call(this);
771777
772778
var converter = contribution._boundExpressionLiteral ? function (e) {
773-
return "(" + e + ").x - (" + contribution._boundExpressionLiteral + ").x";
779+
return "Math.max(0, (" + e + ").x - (" + contribution._boundExpressionLiteral + ").x)";
774780
} : null;
775781
776782
var meta = {minX: "0", lockY: "true"};

StencilBuilder/Layout.epgz

202 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)