0

I am trying to set theme for my application.I included the dependent files in the order jquery,lodash,backbone,graphlib,dagre,keyboard,rappid and localJs file. when i tried to set the theme with joint.setTheme(dark); it throws an error in the console Joint.setTheme is not a function. I went through the rappid documentation Rappid documentation UI

I included rappid.js and rappid.css files instead of including individually other joint.ui.xxx.js files in-order to get access to all the features that rappid provides.

the sample JS code looks like this joint.setTheme error code. How can i set the theme specific to the code written in the fiddle below? please help...

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
priya
  • 21
  • 5
  • Please edit the externally hosted code into the post; doing so will make sure it remains useful even if the link breaks. My script [is not allowed to do this](https://meta.stackoverflow.com/a/344512/4751173) because of potential licensing problems. – Glorfindel Jan 28 '22 at 09:00

2 Answers2

1

you don't need to include rappid for themes, as the setThemes is part of the JointJS core. Also make sure joint is exposed to global namespace when you tried the joint.setTheme in browser console.

For inspiration please visit setTheme fiddle https://jsfiddle.net/vtalas/2kubzakn/

vt.
  • 1,398
  • 7
  • 15
0

Actually i need Rappid for application styling. What i found is joint.setTheme is available in rappid V2.0 i was using older version(found with joint.version in the console). When i update rappid.min.css and rappid.min.js to V2.0 it is working. @vt your example is impressive. Thanks for that and appreciate your time.

priya
  • 21
  • 5