jquery.flowchart icon indicating copy to clipboard operation
jquery.flowchart copied to clipboard

Auto Scale to screen resolution?

Open MadTomT opened this issue 6 years ago • 2 comments

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 avatar May 10 '19 23:05 MadTomT

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 avatar May 11 '19 16:05 MadTomT

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 ?

MadTomT avatar May 12 '19 13:05 MadTomT