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

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

Closed
MorphZhou opened this issue Nov 5, 2020 · 0 comments
Closed

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

MorphZhou opened this issue Nov 5, 2020 · 0 comments

Comments

@MorphZhou
Copy link

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

@davidjgraph davidjgraph transferred this issue from another repository Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants