mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 03:43:48 +01:00
Fix PNG exporter.
This commit is contained in:
parent
1256d0e218
commit
7e59b19fc0
@ -213,14 +213,10 @@ public class ExporterFactory {
|
||||
int index = imgUrl.lastIndexOf("/");
|
||||
elem.removeAttribute("href");
|
||||
if (index != -1) {
|
||||
final String iconName = imgUrl.substring(index+1);
|
||||
final String iconName = imgUrl.substring(index + 1);
|
||||
// Hack for backward compatibility . This can be removed in 2012. :)
|
||||
String imgPath;
|
||||
if (imgUrl.contains("images")) {
|
||||
imgPath = imgBaseUrl + "/../icons/legacy/" + iconName;
|
||||
} else {
|
||||
imgPath = imgBaseUrl + "/" + imgUrl;
|
||||
}
|
||||
imgPath = imgBaseUrl + "/" + imgUrl;
|
||||
elem.setAttribute("xlink:href", imgPath);
|
||||
elem.appendChild(document.createTextNode(" "));
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class TransformView extends AbstractView {
|
||||
response.setContentType(contentType);
|
||||
|
||||
// Set file name...
|
||||
final String fileName = (filename != null ? filename : "map" + ".") + exportFormat.getFileExtension();
|
||||
final String fileName = (filename != null ? filename : "map") + "." + exportFormat.getFileExtension();
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
|
||||
// Write content ...
|
||||
@ -79,7 +79,7 @@ public class TransformView extends AbstractView {
|
||||
baseUrl = "http://www.wisemapping.com/images";
|
||||
} else {
|
||||
final ServletContext servletContext = this.getServletContext();
|
||||
baseUrl = "file://" + servletContext.getRealPath("/icons/") + "/";
|
||||
baseUrl = "file://" + servletContext.getRealPath("/");
|
||||
}
|
||||
properties.setBaseImagePath(baseUrl);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user