detach parameter show/hide

User 7fe7cbcd5f

18-12-2006 17:12:35

I set up the sketcher applet to open when the user clicks the view applet. This works fine, however, when I close the sketcher, it relocates itself inside my view applet. This happens when I set detach=hide.





When I set detach=show, everything works as it should. Closing the sketcher merely transfers the chemical to the viewer, as expected. However, I don't want the sketcher to pop open until the user clicks the applet. Setting detach=show pops open the sketcher as soon as the page loads.





Why does closing the sketcher when detach=hide change the viewer into a sketcher applet? How can I avoid this problem? I am using version 4.1.4





Any help is appreciated...

User 7fe7cbcd5f

18-12-2006 18:00:52

To see the issue I am describing, you can look here:





http://www.chemaxon.com/marvin/examples/applets/example-sketch3.5.html





If you click to viewer, the sketcher is opened. If you click the view again, the sketcher closes just fine.





Now, click the view to open and close the sketcher via the X in the top right corner of the sketcher window.





You'll see the sketcher applet is loaded in the viewer.





We have been using marvin since it's early v3x revisions and this has never been an issue. How can this be resolved without modifying the functionality?





Thanks again. Greg

ChemAxon 7c2d26e5cf

18-12-2006 19:27:04

Use the undetachByX parameter with false value.


Code:
msketch_begin("../..", 200, 200);


msketch_param("mol", "../../mols-2d/esterification.rxn");


msketch_param("autoScale", "true");


msketch_param("detach", "hide");


msketch_param("menubar", "false");


msketch_param("reactionErrorVisible", "false");


msketch_param("isMyTemplatesEnabled", "true");


msketch_param("undetachByX","false");


msketch_end();