Skip to content

Commit b997879

Browse files
committed
simplify tosvg
1 parent 92b2bfe commit b997879

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

src/lib/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ exports.sorterDes = function(a, b) { return b - a; };
6464
*/
6565
exports.distinctVals = function(valsIn) {
6666
var vals = valsIn.slice(); // otherwise we sort the original array...
67-
vals.sort(exports.sorterAsc); // undefined listed in the end - also works on IE11
67+
vals.sort(exports.sorterAsc); // undefined listed in the end
6868

6969
var last;
7070
for(last = vals.length - 1; last > -1; last--) {

src/plots/plots.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ plots.addLinks = function(gd) {
146146

147147
// If text's width is bigger than the layout
148148
// Check that text is a child node or document.body
149-
// because otherwise IE/Edge might throw an exception
149+
// because otherwise Edge might throw an exception
150150
// when calling getComputedTextLength().
151151
// Apparently offsetParent is null for invisibles.
152152
if(document.body.contains(text) && text.getComputedTextLength() >= (fullLayout.width - 20)) {

src/snapshot/tosvg.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@ module.exports = function toSVG(gd, format, scale) {
143143
.attr('stroke-width', 0);
144144
}
145145

146-
// fix for IE namespacing quirk?
147-
// http://stackoverflow.com/questions/19610089/unwanted-namespaces-on-svg-markup-when-using-xmlserializer-in-javascript-with-ie
148-
svg.node().setAttributeNS(xmlnsNamespaces.xmlns, 'xmlns', xmlnsNamespaces.svg);
149-
svg.node().setAttributeNS(xmlnsNamespaces.xmlns, 'xmlns:xlink', xmlnsNamespaces.xlink);
150-
151146
if(format === 'svg' && scale) {
152147
svg.attr('width', scale * width);
153148
svg.attr('height', scale * height);

0 commit comments

Comments
 (0)