Add zoom support for embedded maps.
Add new url to embedded maps
This commit is contained in:
@@ -23,6 +23,13 @@ import java.util.List;
|
||||
|
||||
@Controller
|
||||
public class MindmapController {
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
MindmapController() {
|
||||
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private MindmapService mindmapService;
|
||||
|
||||
@@ -100,6 +107,17 @@ public class MindmapController {
|
||||
return view;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "maps/{id}/embed")
|
||||
public ModelAndView embeddedView(@PathVariable int id, @RequestParam(required = false) Float zoom, @NotNull HttpServletRequest request) {
|
||||
ModelAndView view;
|
||||
final UserAgent userAgent = UserAgent.create(request);
|
||||
final MindMap mindmap = mindmapService.getMindmapById(id);
|
||||
view = new ModelAndView("mindmapEmbedded", "mindmap", mindmap);
|
||||
view.addObject("user", Utils.getUser());
|
||||
view.addObject("zoom", zoom == null ? 1 : zoom);
|
||||
return view;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "collaborator")
|
||||
public ModelAndView showCollaborator(@RequestParam(required = true) long mapId) {
|
||||
final MindMapBean modelObject = findMindmapBean(mapId);
|
||||
|
Reference in New Issue
Block a user