Hello,
I’m creating a session in JavaScript and passing one initial Bool parameter
const createdSession = await createSession({
ticket: shapeDiverTicketId,
modelViewUrl: MODEL_VIEW_URL,
id: "shapediver-session",
initialParameterValues: { "Underline": "true" },
});
I’m then logging the names, values and types of the parameters in that created session
Object.values(createdSession.parameters).forEach((param) => {
if (param.type === "Bool") {
console.log("param.name", param.name, "param.value", param.value, "typeof param.value", typeof param.value);
}
});
The output log:
param.name Height/Lenght Priority param.value false typeof param.value boolean
param.name Italics param.value false typeof param.value boolean
param.name Custom Font param.value false typeof param.value boolean
param.name Show Dimensions param.value false typeof param.value boolean
param.name Absolute/Relative Line Spacing param.value false typeof param.value boolean
param.name Merge Characters param.value true typeof param.value boolean
param.name Underline param.value true typeof param.value string
param.name Bold Text param.value true typeof param.value boolean
Notice that the value type of Underline which is a Bool parameter becomes a string. This always happens when value of the Bool parameter is set in the initial parameters dictionary.
Is this intentional?