拓展 / InterractionCallbacks / EdgeCreateDecision
类型别名: EdgeCreateDecision
EdgeCreateDecision =
boolean| {accept:boolean;data?:EdgeData;directed?:boolean|null;id?:string;persisted?:boolean;style?:PartialEdgeFullStyle; }
定义于:interfaces/InterractionCallbacks.ts:427
由InterractionCallbacks.onBeforeEdgeCreate返回的决定。
true 默认接受,false 否决。对象形式接受(当accept为真时)并让消费者提供新边的数据/样式/id/方向。 data/style/id/directed字段仅适用于边缘,对于注释链接将被忽略。
类型声明
boolean
{ accept: boolean; data?: EdgeData; directed?: boolean | null; id?: string; persisted?: boolean; style?: PartialEdgeFullStyle; }
accept
accept:
boolean
data?
optionaldata:EdgeData
directed?
optionaldirected:boolean|null
id?
optionalid:string
persisted?
optionalpersisted:boolean
消费者将这个创建写入到自己的后端——只有消费者才能知道发生了写入,因此只有消费者才能声明它。历史行被标记为已保存,并且仍然反转:撤消将元素从画布上移走,后端保留其副本,并且菜单在单击之前如此显示。
style?
optionalstyle:PartialEdgeFullStyle