-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improves code readability for image traces
- Loading branch information
Showing
4 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ var Lib = require('../../lib'); | |
var xmlnsNamespaces = require('../../constants/xmlns_namespaces'); | ||
var constants = require('./constants'); | ||
|
||
var unsupportedBrowsers = Lib.isIOS() || Lib.isSafari() || Lib.isIE(); | ||
|
||
function compatibleAxis(ax) { | ||
return ax.type === 'linear' && | ||
// y axis must be reversed but x axis mustn't be | ||
|
@@ -23,7 +25,7 @@ module.exports = function plot(gd, plotinfo, cdimage, imageLayer) { | |
var xa = plotinfo.xaxis; | ||
var ya = plotinfo.yaxis; | ||
|
||
var supportsPixelatedImage = !Lib.isIOS() && !Lib.isSafari() && !Lib.isIE() && !gd._context._exportedPlot; | ||
var supportsPixelatedImage = !(unsupportedBrowsers || gd._context._exportedPlot); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
antoinerg
Author
Contributor
|
||
|
||
Lib.makeTraceGroups(imageLayer, cdimage, 'im').each(function(cd) { | ||
var plotGroup = d3.select(this); | ||
|
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
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
@antoinerg do we still need this
gd._context._exportedPlot
fall back?