Skip to content
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

Auto Scale to screen resolution? #111

Open
MadTomT opened this issue May 10, 2019 · 2 comments
Open

Auto Scale to screen resolution? #111

MadTomT opened this issue May 10, 2019 · 2 comments

Comments

@MadTomT
Copy link

MadTomT commented May 10, 2019

Hi
If I've made a flow in a system with a hres screen, if I then open it on a lower res screen some elements are off screen and not displayed.

Is there any way to scale this to the current resolution?

Thanks

@MadTomT
Copy link
Author

MadTomT commented May 11, 2019

I've got this working quite nicely using these zoom functions

var currentZoom = 1.0;

$('#btn_ZoomIn').click(
    function () {
        $('#vxmllayout').animate({ 'zoom': currentZoom += .1 }, 'slow');
		$flowchart.flowchart('redrawLinksLayer');  
    })
$('#btn_ZoomOut').click(
    function () {
        $('#vxmllayout').animate({ 'zoom': currentZoom -= .1 }, 'slow');
		$flowchart.flowchart('redrawLinksLayer');  
    })
$('#btn_ZoomReset').click(
    function () {
        currentZoom = 1.0
        $('#vxmllayout').animate({ 'zoom': 1 }, 'slow');
		$flowchart.flowchart('redrawLinksLayer');  
})

The only issue is when I'm zoomed in or out, if I try to create a link between two elements the link line doesn't follow the mouse cursor. If I go from one output connect to an input connector, the link is drawn, it's just the dotted line that appears while I'm dragging the link. Any way to solve that ?

Thanks

@MadTomT
Copy link
Author

MadTomT commented May 12, 2019

Sort of go this working, but as I move the mouse down the screen the gap between the mouse and the dotted temporary link grows wider. Any way to sort that ?

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

No branches or pull requests

1 participant