Skip to content
This repository was archived by the owner on Mar 31, 2021. It is now read-only.
This repository was archived by the owner on Mar 31, 2021. It is now read-only.

Maybe a calculation error with function center() in mxGraph.js #506

@MorphZhou

Description

@MorphZhou

the same issue as one in the jgraph/mxgraph2 repo

the key code is here:
https://github.com/jgraph/mxgraph/blob/master/javascript/src/js/view/mxGraph.js#L8008

this.view.setTranslate((horizontal) ? Math.floor(t.x - bounds.x * s + dx * cx / s) : t.x,
			(vertical) ? Math.floor(t.y - bounds.y * s + dy * cy / s) : t.y);

the expressionbounds.x * s and bounds.y * s should be bounds.x / s and bounds.y / s

Metadata

Metadata

Assignees

No one assigned

    Labels

    notstalePrevent stale bot from closing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions