我正在尝试为我的应用程序设置主题。我按照 jquery、lodash、backbone、graphlib、dagre、keyboard、rappid 和 localJs 文件的顺序包含了依赖文件。当我尝试使用 joint.setTheme(dark); 设置主题时它在控制台中抛出错误 Joint.setTheme 不是函数。我快速浏览了文档 Rappid documentation UI
我包含了 rappid.js 和 rappid.css 文件,而不是单独包含其他的 joint.ui.xxx.js 文件,以便访问 rappid 提供的所有功能。
示例 JS 代码如下 joint.setTheme error code 。 我如何设置特定于下面 fiddle 中编写的代码的主题?请帮忙...
最佳答案
您不需要包含 rappid 主题,因为 setThemes 是 JointJS 核心的一部分。当您在浏览器控制台中尝试 joint.setTheme 时,还要确保将 joint
暴露给全局命名空间。
如需灵感,请访问 setTheme fiddle https://jsfiddle.net/vtalas/2kubzakn/
关于javascript - joint.setTheme 不是 JointJS-Rappid 中的函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40324774/