scalePreview
info
The property is available only in the default mode of the editor (type:"default")
Description
Optional. Defines the scale of items rendered in the left panel of the editor
Usage
scalePreview?: string | number;
Default config
scalePreview: 0.5
Example
const editor = new dhx.DiagramEditor("editor_container", {
scalePreview: 0.6,
});
The value of the property can be redefined for a separate type of a shape via the scale attribute of the preview property of the shape object:
const defaults = {card: {
preview: {
scale: 0.72,
gap: 2
}
}
const editor = new dhx.DiagramEditor("editor_container", {
shapeSections: {
"org chart shapes": ["card", "img-card"],
"flowchart shapes": [true]
},
scalePreview: 0.65,
defaults: defaults
});
While the scale of the "card"-type shapes is 0.72, the scale of the other shapes in the left panel is 0.65.
Related articles: Left Panel