Created
November 14, 2011 16:56
-
-
Save jfsiii/1364431 to your computer and use it in GitHub Desktop.
Flot 0.7 updated to support node-canvas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42a43,44 | |
> width: null, | |
> height: null, | |
137c139,141 | |
< hooks: {} | |
--- | |
> hooks: {}, | |
> width: null, | |
> height: null | |
687c691,696 | |
< var c = document.createElement('canvas'); | |
--- | |
> var c; | |
> if (window.Canvas){ // node-canvas is installed | |
> c = new Canvas(canvasWidth, canvasHeight); | |
> } else { | |
> c = document.createElement('canvas'); | |
> } | |
697c706 | |
< if (!c.getContext) // excanvas hack | |
--- | |
> if (window.G_vmlCanvasManager) // excanvas hack | |
707,708c716,717 | |
< canvasWidth = placeholder.width(); | |
< canvasHeight = placeholder.height(); | |
--- | |
> canvasWidth = placeholder.width() || options.width; | |
> canvasHeight = placeholder.height() || options.height; | |
748d756 | |
< | |
751d758 | |
< | |
862c869 | |
< if (w == null) | |
--- | |
> if (!w) | |
866c873 | |
< if (h == null) { | |
--- | |
> if (!h) { | |
902c909 | |
< if (w == null) | |
--- | |
> if (!w) | |
904c911 | |
< if (h == null) | |
--- | |
> if (!h) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment