简体   繁体   English

AlloyUI(图表生成器)扩展

[英]AlloyUI (diagram-builder) extends

I'm trying to customise diagram builder, I created new type of node and trying to add custom attributes with custom editor. 我试图自定义图生成器,创建了新类型的节点,并尝试使用自定义编辑器添加自定义属性。

I just extend from dropdownCellEditor and it already doesn't work (editor appears, but can not save value, seems save and cancel buttons do not work) :( 我只是从dropdownCellEditor扩展,它已经不起作用(出现编辑器,但无法保存值,似乎保存和取消按钮不起作用):(

If I replace my custom editor to DropdownCellEditor - it's ok. 如果我将自定义编辑器替换为DropdownCellEditor-没关系。

  editor: new Y.DropDownCellEditor({options: {
        apple: 'Apple',
        banana: 'Banana',
        cherry: 'Cherry',
        kiwi: 'Kiwi'
  }}),

Can someone explain what's going wrong ? 有人可以解释出什么问题了吗?

Code I'm trying to make workable: http://jsfiddle.net/tu89ap1o/1/ 我正在尝试使之可行的代码: http : //jsfiddle.net/tu89ap1o/1/

I would be very happy if some shares good documentation for AlloUI framework. 如果有人共享AlloUI框架的良好文档,我将感到非常高兴。 Or suggest good library for building diagrams. 或建议建立图表的良好库。 Goals: need to have possibility to build custom nodes with different set of properties and edit them. 目标:有可能构建具有不同属性集的自定义节点并对其进行编辑。

Thank you in advance. 先感谢您。

After many hours of debugging obfuscating code I've found that hide function works by just adding into class: your editor name plus '-hidden', so to make it workable need to add : 经过数小时的对混淆代码的调试,我发现hide函数仅通过添加到类中即可起作用:您的编辑器名称加上“ -hidden”,因此要使其可行,需要添加:

.mycustomcelleditor-hidden { display: none; }

into css, stupid implementation BTW. 变成css,愚蠢的执行BTW。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM