55143681 Posted March 2, 2022 Share Posted March 2, 2022 Dear Shezrod: "JSMind" is a javascript can used to draw some mind picture, and it give me some examples and docs: jsmind-master\docs jsmind-master\examples Can you tell me how to use it in my unigui project? Thank you very much. jsmind-master (2).zip Quote Link to comment Share on other sites More sharing options...
55143681 Posted March 2, 2022 Author Share Posted March 2, 2022 27 minutes ago, 55143681 said: Dear Shezrod: "JSMind" is a javascript can used to draw some mind picture, and it give me some examples and docs: jsmind-master\docs jsmind-master\examples Can you tell me how to use it in my unigui project? Thank you very much. jsmind-master (2).zip 95.72 kB · 0 downloads Quote Link to comment Share on other sites More sharing options...
55143681 Posted March 2, 2022 Author Share Posted March 2, 2022 Just now, 55143681 said: I am so glad to tell you that I have call jsmind from my unigui project successfully, but I want to call the jsmind dynamicly, How to transfer my own mind data into the html code or javascript? My example is follow: 1、Add js to UniServerModule->CustomFiles: files/js/jsmind.js files/js/jsmind.screenshot.js files/js/jsmind.draggable.js 2、Add css to UniServerModule->CustomCss: files/style/jsmind.css 3、Add HTML code to UniHTMLFrame->HTML: <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>jsMind</title> <link type="text/css" rel="stylesheet" href="../style/jsmind.css" /> <style type="text/css"> #jsmind_container{ width:800px; height:500px; border:solid 1px #ccc; /*background:#f4f4f4;*/ background:#f4f4f4; } </style> </head> <body> <div id="jsmind_container"></div> <script type="text/javascript" src="../js/jsmind.js"></script> <script type="text/javascript" src="../js/jsmind.draggable.js"></script> <script type="text/javascript"> function load_jsmind(){ var mind = { "meta":{ "name":"demo", "author":"hizzgdev@163.com", "version":"0.2", }, "format":"node_array", "data":[ {"id":"root", "isroot":true, "topic":"jsMind"}, {"id":"sub1", "parentid":"root", "topic":"sub1", "background-color":"#0000ff"}, {"id":"sub11", "parentid":"sub1", "topic":"sub11"}, {"id":"sub12", "parentid":"sub1", "topic":"sub12"}, {"id":"sub13", "parentid":"sub1", "topic":"sub13"}, {"id":"sub2", "parentid":"root", "topic":"sub2"}, {"id":"sub21", "parentid":"sub2", "topic":"sub21"}, {"id":"sub22", "parentid":"sub2", "topic":"sub22","foreground-color":"#33ff33"}, {"id":"sub3", "parentid":"root", "topic":"sub3"}, ] }; var options = { container:'jsmind_container', editable:true, theme:'primary' } var jm = jsMind.show(options,mind); // jm.set_readonly(true); // var mind_data = jm.get_data(); // alert(mind_data); jm.add_node("sub2","sub23", "new node", {"background-color":"red"}); jm.set_node_color('sub21', 'green', '#ccc'); } load_jsmind(); </script> </body> </html> Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 2, 2022 Share Posted March 2, 2022 26 minutes ago, 55143681 said: I am so glad to tell you that I have call jsmind from my unigui project successfully, Hello. Okay, good. 26 minutes ago, 55143681 said: but I want to call the jsmind dynamicly, How to transfer my own mind data into the html code or javascript? I don't know. Need to check... Quote Link to comment Share on other sites More sharing options...
55143681 Posted March 2, 2022 Author Share Posted March 2, 2022 2 minutes ago, Sherzod said: Hello. Okay, good. I don't know. Need to check... Thank you very much, I just want to use UniDAC to query my data and transfer my mind data "node_array" into the jsmind to draw my mind picture. Quote Link to comment Share on other sites More sharing options...
55143681 Posted March 3, 2022 Author Share Posted March 3, 2022 19 hours ago, 55143681 said: Thank you very much, I just want to use UniDAC to query my data and transfer my mind data "node_array" into the jsmind to draw my mind picture. Maybe I have to use "UniHTMLFrame1->HTML->Add()" to do this. UniHTMLFrame1->HTML->Add(" \"data\":[") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"root\", \"isroot\":true, \"topic\":\"jsMind\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub1\", \"parentid\":\"root\", \"topic\":\"sub1\", \"background-color\":\"#0000ff\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub11\", \"parentid\":\"sub1\", \"topic\":\"sub11\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub12\", \"parentid\":\"sub1\", \"topic\":\"sub12\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub13\", \"parentid\":\"sub1\", \"topic\":\"sub13\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub2\", \"parentid\":\"root\", \"topic\":\"sub2\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub21\", \"parentid\":\"sub2\", \"topic\":\"sub21\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub22\", \"parentid\":\"sub2\", \"topic\":\"sub22\",\"foreground-color\":\"#33ff33\"},") ; UniHTMLFrame1->HTML->Add(" {\"id\":\"sub3\", \"parentid\":\"root\", \"topic\":\"sub3\"},") ; UniHTMLFrame1->HTML->Add(" ]") ; UniHTMLFrame1->HTML->Add(" };") ; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.