We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b68e84 commit 2571971Copy full SHA for 2571971
1 file changed
components/core/CreateShape.js
@@ -249,10 +249,13 @@ const CreateShape = (props) => {
249
let formulaNumbers = formula.slice(formula.indexOf("(") + 1, formula.indexOf(")"));
250
formulaNumbers = formulaNumbers.split(",");
251
newVerticeCoordinates = formulaNumbers.map(x => {
252
- let percentageArray = x.trim().split(" ");
+ let values = x.trim();
253
+ let xValue = values.substring(0, values.indexOf("%") + 1).trim();
254
+ let yValue = values.substring(values.indexOf("%") + 1).trim();
255
+
256
return {
- "x": percentageArray[0],
- "y": percentageArray[1],
257
+ "x": xValue,
258
+ "y": yValue,
259
}
260
});
261
0 commit comments