Skip to content

Commit a2734ab

Browse files
committed
post-rebase fixes
1 parent 81d184a commit a2734ab

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/traces/parcoords/base_plot.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
'use strict';
1010

11+
var d3 = require('d3');
1112
var Plots = require('../../plots/plots');
1213
var parcoordsPlot = require('./plot');
1314
var xmlnsNamespaces = require('../../constants/xmlns_namespaces');
@@ -52,7 +53,8 @@ exports.toSVG = function(gd) {
5253
var canvasContentOriginX = parseFloat(canvasStyle.getPropertyValue('padding-left')) + (rect.left - parentRect.left) + canvasOffset[0];
5354
var canvasContentOriginY = parseFloat(canvasStyle.getPropertyValue('padding-top')) + (rect.top - parentRect.top) + canvasOffset[1];
5455
var imageData = canvas.toDataURL('image/png');
55-
var image = gd._fullLayout._glimages.append('svg:image');
56+
var image = imageRoot.append('svg:image');
57+
5658
image.attr({
5759
xmlns: xmlnsNamespaces.svg,
5860
'xlink:href': imageData,
@@ -64,7 +66,15 @@ exports.toSVG = function(gd) {
6466
});
6567
}
6668

67-
var canvases = document.querySelectorAll('.parcoords-lines.context, .parcoords-lines.focus');
69+
imageRoot.selectAll('*').remove();
70+
canvases.each(canvasToImage);
6871

69-
canvases.forEach(canvasToImage);
72+
// Chrome / Safari bug workaround - browser apparently loses connection to the defined pattern
73+
// Without the workaround, these browsers 'lose' the filter brush styling (color etc.) after a snapshot
74+
// on a subsequent interaction.
75+
// Firefox works fine without this workaround
76+
window.setTimeout(function() {
77+
d3.selectAll('#filterBarPattern')
78+
.attr('id', 'filterBarPattern');
79+
}, 0);
7080
};

src/traces/parcoords/parcoords.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function styleExtentTexts(selection) {
217217
.classed('axisExtentText', true)
218218
.attr('text-anchor', 'middle')
219219
.style('font-weight', 100)
220-
.style('font-size', 'x-small')
220+
.style('font-size', '10px')
221221
.style('cursor', 'default')
222222
.style('user-select', 'none');
223223
}
@@ -557,7 +557,7 @@ module.exports = function(root, svg, styledData, layout, callbacks) {
557557
axisEnter
558558
.selectAll('text')
559559
.style('font-weight', 100)
560-
.style('font-size', 'x-small')
560+
.style('font-size', '10px')
561561
.style('fill', 'black')
562562
.style('fill-opacity', 1)
563563
.style('stroke', 'none')

0 commit comments

Comments
 (0)