User 7b920125ea
02-04-2013 09:11:37
Hi,
Is it possible to open for example the source panel of a MarvinSketch applet, with javascript code ?
Thank you.
User 7b920125ea
02-04-2013 09:11:37
Hi,
Is it possible to open for example the source panel of a MarvinSketch applet, with javascript code ?
Thank you.
ChemAxon 2c555f5717
02-04-2013 09:31:39
Dear Quentin Delettre!
There is no JavaScript function to pop up source window, but you can get the molecule with the getMol(format) function, and than you can show it from JavaScript.
Regards:
Balázs
User 7b920125ea
02-04-2013 09:39:03
Dear Balázs,
Thank you for the quick reply. I wanted to get ride of javascript stuff and interact directly with the Marvin functionnalities, as it sound redondant to me to create another div to display the molecule as text as marvin can do it.
Anyway, i will use JS. Thank you.
ChemAxon 5433b8e56b
02-04-2013 11:23:08
Hi,
I do not really understand what are you trying to achieve. Can you tell me more about this functionality in your web application? What is the scenario which can be solved if you can programatiacally pop up this dialog?
I am asking because if we see the usability and usfullness of this functionality then we can consider to implement it.
Regards,
Istvan
User 7b920125ea
02-04-2013 11:29:47
My use case is simple.
Sometimes users might want to see the molecule data as text, right ? But users are lazy or may not know that marvin can do that, and want button to click on to speed things and access the most needed functionnalities.
I wanted to put a button on the page to provide the users an access to the "show as text" functionnality without searching in the marvin ui.
Instead i will manipulate the dom of my page and create a div to show that. Not a problem to do, but as a marvin user i can be lazy too and wanted marvin to do all the work for me ;)
ChemAxon 5433b8e56b
02-04-2013 11:56:08
I see, and I have one more question: how can the user specify the format in which he or she wants to see the structure? Is there a default, or there is a selection box somewhere around the button?
We will consider to implement such a method, and get back to you with our decision soon, I hope today, or tomorrow.
User 7b920125ea
02-04-2013 12:01:18
I think i will provide sdf (button show sdf as text). But i could just link a Js function to a set of dropdown buttons with the most common formats.
The goal of my page is to generate 3D conformers for user inputs.
ChemAxon 2c555f5717
02-04-2013 12:05:53
Till that time you can customize the menubar, or one of your toolbars to look like this:
User 7b920125ea
02-04-2013 12:08:36
Well, that looks good to me ! I suppose i can see how to do that in the docs.
Thanks
ChemAxon 2c555f5717
02-04-2013 12:22:41
shortly:
view > customize
toolbars tab > choose a toolbar (I have choosen General) > click add
in Documents categorie > Edit source > click add
(you can rename and replace it)
than you will have a costumization.xml file in your home/chemaxon folder
you can set this as a default customization on your applet with menuconfig paremeter