AlloyUI(图表生成器)扩展 [英] AlloyUI (diagram-builder) extends

查看:109
本文介绍了AlloyUI(图表生成器)扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自定义图生成器,创建了新类型的节点,并尝试使用自定义编辑器添加自定义属性。

I'm trying to customise diagram builder, I created new type of node and trying to add custom attributes with custom editor.

我只是从dropdownCellEditor扩展而来已经不起作用(出现编辑器,但无法保存值,似乎保存和取消按钮不起作用):(

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.

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

有人可以解释这是怎么回事吗?

Can someone explain what's going wrong ?

代码我正在尝试使其可行: http://jsfiddle.net/tu89ap1o/1/

Code I'm trying to make workable: http://jsfiddle.net/tu89ap1o/1/

如果有人共享有关AlloUI框架的良好文档,我将感到非常高兴。
或建议建立良好的图表库目标:需要有可能ild具有不同属性集的自定义节点并对其进行编辑。

I would be very happy if some shares good documentation for AlloUI framework. Or suggest good library for building diagrams. Goals: need to have possibility to build custom nodes with different set of properties and edit them.

预先感谢您。

推荐答案

经过数小时的混淆代码调试,我发现hide函数仅通过添加到类中即可工作:您的编辑器名称加上 -hidden,因此要使其可行,需要添加:

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 :


.mycustomcelleditor-hidden {
display:none;
}

进入CSS,愚蠢的实施BTW。

into css, stupid implementation BTW.

这篇关于AlloyUI(图表生成器)扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆