Created
November 20, 2010 21:25
-
-
Save jfsiii/708172 to your computer and use it in GitHub Desktop.
diff of changes required to SVN version of Flot 0.6 to get it running on Node (with 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
39a40,41 | |
> width: null, | |
> height: null, | |
701c703,709 | |
< var c = document.createElement('canvas'); | |
--- | |
> var c; | |
> if (typeof Canvas !== "undefined"){ | |
> c = new Canvas(width, height); | |
> } else { | |
> c = document.createElement('canvas'); | |
> } | |
> | |
704c712,713 | |
< if (!c.getContext) // excanvas hack | |
--- | |
> | |
> if (window.G_vmlCanvasManager) // excanvas hack | |
709,710c718,720 | |
< canvasWidth = placeholder.width(); | |
< canvasHeight = placeholder.height(); | |
--- | |
> canvasWidth = placeholder.width() || options.width; | |
> canvasHeight = placeholder.height() || options.height; | |
> | |
722c732,733 | |
< canvas = $(makeCanvas(canvasWidth, canvasHeight)).appendTo(placeholder).get(0); | |
--- | |
> canvas = makeCanvas(canvasWidth, canvasHeight); | |
> if (placeholder.length) $(canvas).appendTo(placeholder); | |
726c737,739 | |
< overlay = $(makeCanvas(canvasWidth, canvasHeight)).css({ position: 'absolute', left: 0, top: 0 }).appendTo(placeholder).get(0); | |
--- | |
> overlay = makeCanvas(canvasWidth, canvasHeight); | |
> if (placeholder.length) | |
> $(overlay).css({ position: 'absolute', left: 0, top: 0 }).appendTo(placeholder); | |
846c859 | |
< if (w == null) | |
--- | |
> if (!w) | |
848c861 | |
< if (h == null) | |
--- | |
> if (!h) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment