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

Reset transform when switching vertical/radial view #88

Open
tkukavica1 opened this issue Dec 12, 2017 · 2 comments
Open

Reset transform when switching vertical/radial view #88

tkukavica1 opened this issue Dec 12, 2017 · 2 comments
Assignees

Comments

@tkukavica1
Copy link
Member

No description provided.

@tkukavica1
Copy link
Member Author

Working on this in the branch transformBugFixes

@tkukavica1
Copy link
Member Author

Added timeouts to the following functions. New issue is the brief "jump" in svg caused by the timeout. However, the dragging glitch is fixed.

function updateVertical() {
	let g = d3.select('#treeBox').select('svg')
		.select('g')
	let currentTransform = g.attr('transform')
	console.log(currentTransform)
	treeLayout.updateVertical(tree)
	setTimeout(() => {
		g.attr('transform', currentTransform)
	}, 1000) // Not ideal to use a timeout, but lower values seem to fail
	treeOperations.updateUserChanges(tree)
}
function updateRadial() {
	let g = d3.select('#treeBox').select('svg')
		.select('g')
	let currentTransform = g.attr('transform')
	treeLayout.updateRadial(tree)
	setTimeout(() => {
		g.attr('transform', currentTransform)
	}, 1000) // Not ideal to use a timeout, but lower values seem to fail
	treeOperations.updateUserChanges(tree)
}

@tkukavica1 tkukavica1 self-assigned this Jun 25, 2018
@tkukavica1 tkukavica1 reopened this Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant