8000 Added padding example to fitToScreen notes by relliv · Pull Request #148 · Foblex/f-flow · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added padding example to fitToScreen notes #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

relliv
Copy link
@relliv relliv commented Apr 2, 2025

Description

Added fitToScreen(PointExtensions.initialize(50, 50), true) example. I'm not sure but this detail is might be important newcomers.

Type of change

  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@@ -17,6 +17,7 @@ The **FCanvasComponent** is an Angular component that serves as a container for
## Methods

- `fitToScreen(toCenter: IPoint = { x: 0, y: 0 }, animated: boolean = true): void;` Adjusts the canvas to fit the screen, optionally centering around a specified point and using animation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to

  • fitToScreen(padding: IPoint = { x: 0, y: 0 }, animated: boolean = true): void; The fitToScreen method automatically adjusts all nodes inside the canvas to fit perfectly within its boundaries, scaling and positioning them to be fully visible and centered. You can specify custom padding to add extra space around the nodes horizontally (x) and vertically (y). This ensures that the nodes are not directly touching the edges of the canvas after resizing. The adjustment can be animated or instant, based on the parameters provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0