首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Javascript流程图

Javascript流程图
EN

Stack Overflow用户
提问于 2017-01-09 11:43:47
回答 1查看 697关注 0票数 1

我正在使用来自http://gojs.net/latest/samples/flowchart.htmlFlowchart,它运行得很好。它唯一的问题是,它也没有t display the toolbar symbols which are shown in the example. Have someone usedFlowchart``并且有同样的问题?

代码语言:javascript
复制
var $ = go.GraphObject.make;

myPalette =
                    $(go.Palette, "myPaletteDiv",  // must name or refer to the DIV HTML element
                        {
                            "animationManager.duration": 800, // slightly longer than default (600ms) animation
                            nodeTemplateMap: myDiagram.nodeTemplateMap,  // share the templates used by myDiagram
                            model: new go.GraphLinksModel([  // specify the contents of the Palette
                                {category: "Start", text: "Start"},
                                {text: "Step"},
                                {text: "???", figure: "Diamond"},
                                {category: "End", text: "End"},
                                {category: "Comment", text: "Comment"}
                            ])
                        });

问题

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-09 13:16:59

在初始化图表及其Diagram.nodeTemplateMap.之前,我认为您正在初始化调色板这实际上意味着调色板没有使用自定义模板,因此调色板中的节点使用默认节点模板。

如果您查看流程图示例中的源代码,您将看到以下内容:

代码语言:javascript
复制
// initialize the Palette that is on the left side of the page
myPalette =
  $(go.Palette, "myPaletteDiv",  // must name or refer to the DIV HTML element
    {
      "animationManager.duration": 800, // slightly longer than default (600ms) animation
      nodeTemplateMap: myDiagram.nodeTemplateMap,  // share the templates used by myDiagram
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41547324

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档