-
Hi -- I'm using @deck.gl/google-maps in a React app and want to do a screen capture using the html-2-image package. |
Beta Was this translation helpful? Give feedback.
Answered by
dCogs
Jun 27, 2024
Replies: 1 comment
-
I was able to get it to work with this: <script> HTMLCanvasElement.prototype.getContext = function(origFn) { return function(type, attribs) { attribs = attribs || {}; attribs.preserveDrawingBuffer = true; return origFn.call(this, type, attribs); }; }(HTMLCanvasElement.prototype.getContext); </script>I haven't finished testing everything, but looks promising.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dCogs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to get it to work with this:
<script> HTMLCanvasElement.prototype.getContext = function(origFn) { return function(type, attribs) { attribs = attribs || {}; attribs.preserveDrawingBuffer = true; return origFn.call(this, type, attribs); }; }(HTMLCanvasElement.prototype.getContext); </script>I haven't finished testing everything, but looks promising.