How can i change default value of Rectangle > Storke > Style as Cloudy.
Based our requirement we need to set default value as Cloudy in Rectangle > Storke > Style.
Please provide code or documentation for that so we can set in our side.
How can i change default value of Rectangle > Storke > Style as Cloudy.
Based our requirement we need to set default value as Cloudy in Rectangle > Storke > Style.
Please provide code or documentation for that so we can set in our side.
Hey there! Thanks for trying out Express.
You can use this code to set the default style for a tool:
const { docViewer, Tools } = instance;
docViewer.getTool(Tools.ToolNames.RECTANGLE).setStyles({
Style: 'cloudy'
})
Let me know if you have any other questions!
Thanks,
Logan
const rectangleTools = [
Tools.ToolNames.RECTANGLE,
Tools.ToolNames.RECTANGLE2,
Tools.ToolNames.RECTANGLE3,
Tools.ToolNames.RECTANGLE4
]
rectangleTools.forEach(toolName => {
docViewer.getTool(toolName).setStyles({
Style: 'cloudy'
})
})
Hey there,
Please make sure you’re using the latest version. All 4 rectangle tools should be listed there

If you still have issues please let me know!