Skip to content

Force redraw on updateSize #1388

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

Merged
merged 2 commits into from
Feb 17, 2017
Merged

Force redraw on updateSize #1388

merged 2 commits into from
Feb 17, 2017

Conversation

dy
Copy link
Contributor

@dy dy commented Feb 16, 2017

Fixes loosing axes/scale in sequence of toImage.

Test setup:

let list = [
	'gl2d_10',
	'gl2d_12'
]


list.forEach(mock => {
	let div = document.body.appendChild(document.createElement('div'))

	Tabs.getMock(mock, (err, fig) => {

		Plotly.plot(div, fig).then((div) => {
			return Plotly.toImage(div).then(dataUrl => {
				let img = document.body.appendChild(document.createElement('img'))
				img.src = dataUrl
			})
		})

	})
})

Allows to get rid of delay here to speed up serializing.

Reminiscent of https://github.com/plotly/streambed/issues/6307.

@etpinard please take a look, should go well with gl-vis/gl-scatter2d-fancy#5.

Related to losing axes/scale in sequence of toImage
@dy dy mentioned this pull request Feb 16, 2017
15 tasks
@etpinard
Copy link
Contributor

Looking good. I'll test this out in detail tomorrow. Thanks!

@etpinard
Copy link
Contributor

Nicely done. Thanks very much 🍻

@etpinard etpinard merged commit a8a2752 into plotly:master Feb 17, 2017
@dy dy deleted the patch-1 branch February 17, 2017 19:31
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

Successfully merging this pull request may close these issues.

2 participants