Bug 566310 - InfiniteCanvasViewer: Extraction of the creation of the InfiniteCanvas class instance in a separate method.
Summary: InfiniteCanvasViewer: Extraction of the creation of the InfiniteCanvas class ...
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF MVC (show other bugs)
Version: 5.3.0   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-24 04:05 EDT by Markus Muehlbrandt CLA
Modified: 2020-08-24 04:05 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Muehlbrandt CLA 2020-08-24 04:05:03 EDT
The 'getCanvas()' method of the InfiniteCanvasViewer class creates an instance of the InfiniteCanvas and assigns it directly to a private field. It would be nice if the creation of the InfiniteCanvas instance could be moved to a separate factory method (e.g. createCanvas). I want to override a method of the InfiniteCanvas class and let the InfiniteViewer use my customized InfiniteCanvas. Due to the current implementation in the InfiniteCanvasViewer, this is unfortunately a bit cumbersome.

Alternatively, the specific InfiniteCanvas implementation could be registered via an additional binding in the MvcFXModule similar to the viewer. That would be more "GEF-Like". To do this, the InfiniteCanvas instance would have to be created in the viewer via injection.