rfellows commented on code in PR #8874:
URL: https://github.com/apache/nifi/pull/8874#discussion_r1617276676
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/canvas-view.service.ts:
##########
@@ -638,11 +638,11 @@ export class CanvasView {
newScale = 1;
// since the entire graph will fit on the canvas, offset origin
appropriately
- graphLeft -= 100;
- graphTop -= 50;
+ graphLeft -= 313;
+ graphTop -= 25;
Review Comment:
This logic could probably be improved. If the canvas is just slightly bigger
than the graph, the offset used here could push some content out of the
viewable area.
We might consider offsetting by the difference between the canvas and graph
size divided by 2 (essentially center in the canvas). If that is too much, we
could only do it in the case where the difference in the sizes is smaller than
the hardcoded offsets chose here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]