Position
用于配置形状相对于预定义算法在 X 轴和 Y 轴上的偏移量的复杂控件

信息
Position 控件仅在 Diagram 编辑器的 org 或 mindmap 模式下对 shape 元素可用。
用法
{
type: "position",
hidden?: boolean, // 默认为 false
disabled?: boolean, // 默认为 false
css?: string,
width?: string | number | "content", // 默认为 "content"
height?: string | number | "content", // 默认为 "content"
padding?: string | number, // 默认为 "0 16px"
label?: string,
labelAlignment?: "left" | "right" | "center", // 默认为 "left"
align?: "start" | "center" | "end" | "between" | "around" | "evenly", // 默认为 "start"
compact?: boolean, // 默认为 false
// 服务属性
$properties?: object
}
描述
基本属性
type- (必需)控件的类型,设置为"position"hidden- (可选)定义控件是否隐藏,默认为 falsedisabled- (可选)定义控件是启用(false)还是禁用(true),默认为 falsecss- (可选)为控件添加样式类width- (可选)控件的宽度,默认为"content"height- (可选)控件的高度,默认为"content"padding- (可选)设置控件组内内容的内边距,默认为 "0 16px"label- (可选)指定控件的标签labelAlignment- (可选)定义标签的位置,默认为"left"align- (可选)设置控件组内控件的对齐方式,默认为"start"compact- (可选)指定紧凑模式,移除缩进和边框,默认为 false
服务属性
$properties- (可选)允许您在复杂控件中覆盖基本控件)的值。您可以配置基于基本控件的 Position 控件的以下元素:
示例
const editor= new dhx.DiagramEditor("editor_container", {
type: "mindmap",
view: {
editbar: {
properties: {
$shape: [
{
type: "position",
$properties: {
dx: { disabled: true }
}
}
]
}
}
}
});