Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic MindFusion in Electron js (Read 1537 times)
Gadger
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Oct 23rd, 2021
MindFusion in Electron js
Oct 23rd, 2021 at 2:09pm
Print Post  
I'm trying to use the Electron js framework, with "MindFusion JsDiagram Sample - A Simple Diagram" as an example . I have a very simple "main.js" file that just creates the browser window. If I put all the MindFusion code into the HTM file inside <script> tags it works, but if I try to require or import the MindFusion library code into the "main.js" file the require/import fails. Is there a special way of loading "MindFusion.Diagramming.js" etc into an Electron app?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3380
Joined: Oct 19th, 2005
Re: MindFusion in Electron js
Reply #1 - Oct 23rd, 2021 at 2:26pm
Print Post  
With version 3 you can load the diagram scripts using only non-module <script> element and access the API through global MindFusion.Diagramming namespace object. E.g. see https://mindfusion.eu/blog/running-javascript-diagram-applications-with-electron...

You should be able to use import or require statements instead of global namespace with version 4 scripts here:
https://mindfusion.eu/Forum/YaBB.pl?num=1631794657

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Gadger
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Oct 23rd, 2021
Re: MindFusion in Electron js
Reply #2 - Oct 23rd, 2021 at 3:48pm
Print Post  
Thanks -- it sounds like Version 4 will be just what I need
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint