0

我正在尝试向 noflo ui 添加功能,我希望能够选择组并显示一个显示组名称和描述的面板。(该面板将显示在与帮助面板相同的位置。)我试图将其作为扩展组范例的第一步。(我希望能够添加更多组元数据并允许用户编辑该元数据。)

问题

我找不到在哪里放置所选组集合的钩子。(或选定的组属性)。我已经查看了选定节点集合的实现方式,但是 selectedNodes 属性之间的theGraph/thegraph-editor.html连接连接到节点检查器的节点属性(在elements/noflo-node-inspector.htmlelements/noflo-context.html

我查看了application/fbpindex.html 中的脚本,但似乎没有一个与 selected nodes 属性相对应。

问题

如何在 中创建属性并在中theGraph查看该属性noflo-ui

4

2 回答 2

1

实现 selectedGroups 比简单的selectedNodes搜索更复杂。具体来说,我必须找到并编写等效代码:

  1. onNodeSelection (the-graph-group.js, the-graph-graph.js)
  2. 事件处理程序(the-graph-group.js)
  3. 节点事件(the-graph.html)

    //This is where things get confusing
    this.fire('nodes', this.selectedNodes)
    // Note the transition from the selectedNodes property to the nodes event
    
  4. noflo-context.html 的节点属性

  5. noflo-context.html 的 nodesChanged 属性/事件处理程序
  6. noflo-context 和 the-graph-editor 聚合物的节点 inports 属性 (index.html)
  7. GraphEditor NODES -> NODES Context (index.html) 之间的 fbp 链接
  8. 节点输出 GraphEditor.NODES:NODES
  9. 节点属性声明作为 the-graph-editor 聚合物的属性 (the-graph-editor.html)
于 2014-05-08T01:10:32.957 回答
0

答案与selectedNodes和 selectedEdges 的工作方式相同。the-graph (React) 和 noflo-ui (Polymer) 之间的绑定发生在那里。

我为组检查员添加了功能请求:https ://github.com/noflo/noflo-ui/issues/217

于 2014-05-07T05:37:37.130 回答