Skip to content

Commit c7520f9

Browse files
committed
turning away from singleton model
1 parent 3684240 commit c7520f9

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

src/traces/parcoords/parcoords.js

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -96,27 +96,25 @@ function model(layout, d) {
9696
var brushVisibleWidth = d.filterbar.width;
9797
var brushCaptureWidth = d.filterbar.capturewidth || Math.min(32, brushVisibleWidth + 16);
9898

99-
return [
100-
{
101-
key: Math.random(),
102-
dimensions: data,
103-
tickDistance: d.tickdistance,
104-
unitToColor: d.unitToColor,
105-
lines: lines,
106-
translateX: translateX,
107-
translateY: translateY,
108-
padding: padding,
109-
canvasWidth: canvasWidth,
110-
canvasHeight: canvasHeight,
111-
width: width,
112-
height: height,
113-
brushVisibleWidth: brushVisibleWidth,
114-
brushCaptureWidth: brushCaptureWidth,
115-
resizeHeight: resizeHeight,
116-
canvasPixelRatio: canvasPixelRatio,
117-
filterBar: d.filterbar
118-
}
119-
];
99+
return {
100+
key: Math.random(),
101+
dimensions: data,
102+
tickDistance: d.tickdistance,
103+
unitToColor: d.unitToColor,
104+
lines: lines,
105+
translateX: translateX,
106+
translateY: translateY,
107+
padding: padding,
108+
canvasWidth: canvasWidth,
109+
canvasHeight: canvasHeight,
110+
width: width,
111+
height: height,
112+
brushVisibleWidth: brushVisibleWidth,
113+
brushCaptureWidth: brushCaptureWidth,
114+
resizeHeight: resizeHeight,
115+
canvasPixelRatio: canvasPixelRatio,
116+
filterBar: d.filterbar
117+
};
120118
}
121119

122120
function viewModel(model) {
@@ -215,7 +213,7 @@ module.exports = function(root, styledData, layout, callbacks) {
215213
}
216214

217215
var parcoordsModel = d3.select(root).selectAll('.parcoordsModel')
218-
.data(model(layout, styledData), keyFun);
216+
.data([model(layout, styledData)], keyFun);
219217

220218
parcoordsModel.enter()
221219
.append('div')

0 commit comments

Comments
 (0)