Skip to content

Conversation

rassie
Copy link
Contributor

@rassie rassie commented Mar 6, 2013

PhantomJS does not support 3D CSS transform even though it's a Webkit product. This patch detects PhantomJS in the user agent and disables 3D transforms.

Details on PhantomJS support are here: https://groups.google.com/forum/#!msg/phantomjs/h7-4-CWsy1g/KX1tlf5gT5IJ

PhantomJS does not support 3D CSS transform even though it's a Webkit product. This patch detects PhantomJS in the user agent and disables 3D transforms.

Details on PhantomJS support are here: https://groups.google.com/forum/#!msg/phantomjs/h7-4-CWsy1g/KX1tlf5gT5IJ
@rassie
Copy link
Contributor Author

rassie commented Mar 6, 2013

FWIW: I'd be happy if someone could fix the Webkit 3D detection instead of detecting PhantomJS. Some cues on how to do this can be found here.

@mourner
Copy link
Member

mourner commented Mar 6, 2013

Maybe it's better to just add L_DISABLE_3D = true to testacular.js, in the same fashion the touch is disabled for tests?

@rassie
Copy link
Contributor Author

rassie commented Mar 6, 2013

You probably would too for Leaflet tests. However, this is not about tests but more about export possibilities for sites actively using Leaflet. For example, I'd like the maps on my site to be exportable and pointing PhantomJS to the same URL to capture an image seems to be the easiest way. Currently, maps come out skewed because of missing 3D CSS transformations support. You could try running phantomjs rasterize.js http://leafletjs.com/examples/choropleth-example.html choropleth.png and see for yourself.

@mourner
Copy link
Member

mourner commented Mar 6, 2013

Oh, I see. OK, merging.

mourner added a commit that referenced this pull request Mar 6, 2013
Disable 3D CSS transforms on PhantomJS
@mourner mourner merged commit b317954 into Leaflet:master Mar 6, 2013
@rassie rassie deleted the patch-1 branch March 6, 2013 15:13
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