Merge remote-tracking branch 'upstream/develop' into feature/user-journey

This commit is contained in:
Russell Geraghty
2020-04-17 07:30:53 +01:00
22 changed files with 1211 additions and 187 deletions

View File

@@ -214,6 +214,19 @@ export const getStylesFromArray = arr => {
return { style: style, labelStyle: labelStyle };
};
let cnt = 0;
export const generateId = () => {
cnt++;
return (
'id-' +
Math.random()
.toString(36)
.substr(2, 12) +
'-' +
cnt
);
};
export default {
detectType,
isSubstringInArray,
@@ -221,5 +234,6 @@ export default {
calcLabelPosition,
calcCardinalityPosition,
formatUrl,
getStylesFromArray
getStylesFromArray,
generateId
};