From: <ha...@us...> - 2013-01-12 20:16:31
|
Revision: 17858 http://jmol.svn.sourceforge.net/jmol/?rev=17858&view=rev Author: hansonr Date: 2013-01-12 20:16:16 +0000 (Sat, 12 Jan 2013) Log Message: ----------- ___JmolVersion="13.1.12_dev" JavaScript: JSmol writes PNG and PNGJ files from a web page Modified Paths: -------------- trunk/Jmol/src/org/jmol/io2/ZipUtil.java trunk/Jmol/src/org/jmol/modelset/ModelCollection.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/io2/ZipUtil.java =================================================================== --- trunk/Jmol/src/org/jmol/io2/ZipUtil.java 2013-01-11 13:09:23 UTC (rev 17857) +++ trunk/Jmol/src/org/jmol/io2/ZipUtil.java 2013-01-12 20:16:16 UTC (rev 17858) @@ -588,7 +588,7 @@ List<String> newFileNames = new ArrayList<String>(); for (int iFile = 0; iFile < nFiles; iFile++) { String name = fileNames.get(iFile); - boolean isLocal = FileManager.isLocal(name); + boolean isLocal = !viewer.isJS && FileManager.isLocal(name); String newName = name; // also check that somehow we don't have a local file with the same name as // a fixed remote file name (because someone extracted the files and then used them) Modified: trunk/Jmol/src/org/jmol/modelset/ModelCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2013-01-11 13:09:23 UTC (rev 17857) +++ trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2013-01-12 20:16:16 UTC (rev 17858) @@ -3017,13 +3017,31 @@ mol.append(isModelKit ? "Jmol Model Kit" : viewer.getFullPathName() .replace('\\', '/')); String version = Viewer.getJmolVersion(); - Calendar c = Calendar.getInstance(); mol.append("\n__Jmol-").append(version.substring(0, 2)); - TextFormat.rFill(mol, "_00", "" + (1 + c.get(Calendar.MONTH))); - TextFormat.rFill(mol, "00", "" + c.get(Calendar.DAY_OF_MONTH)); - mol.append(("" + c.get(Calendar.YEAR)).substring(2, 4)); - TextFormat.rFill(mol, "00", "" + c.get(Calendar.HOUR_OF_DAY)); - TextFormat.rFill(mol, "00", "" + c.get(Calendar.MINUTE)); + int cMM, cDD, cYYYY, cHH, cmm; + /** + * @j2sNative + * + * var c = new Date(); + * cMM = c.getMonth(); + * cDD = c.getDate(); + * cYYYY = c.getFullYear(); + * cHH = c.getHours(); + * cmm = c.getMinutes(); + */ + { + Calendar c = Calendar.getInstance(); + cMM = c.get(Calendar.MONTH); + cDD = c.get(Calendar.DAY_OF_MONTH); + cYYYY = c.get(Calendar.YEAR); + cHH = c.get(Calendar.HOUR_OF_DAY); + cmm = c.get(Calendar.MINUTE); + } + TextFormat.rFill(mol, "_00", "" + (1 + cMM)); + TextFormat.rFill(mol, "00", "" + cDD); + mol.append(("" + cYYYY).substring(2, 4)); + TextFormat.rFill(mol, "00", "" + cHH); + TextFormat.rFill(mol, "00", "" + cmm); mol.append("3D 1 1.00000 0.00000 0"); // This line has the format: // IIPPPPPPPPMMDDYYHHmmddSSssssssssssEEEEEEEEEEEERRRRRR Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-01-11 13:09:23 UTC (rev 17857) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-01-12 20:16:16 UTC (rev 17858) @@ -11,6 +11,8 @@ ___JmolVersion="13.1.12_dev" +JavaScript: JSmol writes PNG and PNGJ files from a web page + new feature: axes labels "a" "b" "c" "xxx" where "xxx" is the label for the origin bug fix/update: revision of the pages that make the About menu (application) in each language. Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2013-01-11 13:09:23 UTC (rev 17857) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2013-01-12 20:16:16 UTC (rev 17858) @@ -9175,7 +9175,7 @@ // application can do it itself or allow Jmol to do it here JmolImageCreatorInterface c = getImageCreator(); c.setViewer(this, privateKey); - err = c.createImage((FileManager.isLocal(fileName) ? fileName : null), + err = c.createImage((!isJS && FileManager.isLocal(fileName) ? fileName : null), type, text, bytes, scripts, null, quality); if (err instanceof String) // report error status (text_or_bytes == null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |