Skip to content

Commit f624fb8

Browse files
authored
Merge pull request #566 from plotly/version-bump-1391
Version bump 1391
2 parents 8bb558d + d66a6a9 commit f624fb8

File tree

5 files changed

+18
-22
lines changed

5 files changed

+18
-22
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"fast-isnumeric": "^1.1.1",
1616
"immutability-helper": "^2.6.4",
1717
"plotly-icons": "latest",
18-
"plotly.js": "1.38.3",
18+
"plotly.js": "1.39.1",
1919
"prop-types": "^15.5.10",
2020
"raf": "^3.4.0",
2121
"react-color": "^2.13.8",

src/EditorControls.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -228,19 +228,20 @@ class EditorControls extends Component {
228228
break;
229229

230230
case EDITOR_ACTIONS.DELETE_TRANSFORM:
231-
if (isNumeric(payload.transformIndex)) {
232-
for (let i = 0; i < graphDiv.data.length; i++) {
233-
if (graphDiv.data[i].uid === payload.traceUid) {
234-
graphDiv.data[i].transforms.splice(payload.transformIndex, 1);
235-
if (this.props.onUpdate) {
236-
this.props.onUpdate(
237-
graphDiv.data.slice(),
238-
graphDiv.layout,
239-
graphDiv._transitionData._frames
240-
);
241-
}
242-
break;
243-
}
231+
if (
232+
isNumeric(payload.transformIndex) &&
233+
payload.traceIndex < graphDiv.data.length
234+
) {
235+
graphDiv.data[payload.traceIndex].transforms.splice(
236+
payload.transformIndex,
237+
1
238+
);
239+
if (this.props.onUpdate) {
240+
this.props.onUpdate(
241+
graphDiv.data.slice(),
242+
graphDiv.layout,
243+
graphDiv._transitionData._frames
244+
);
244245
}
245246
}
246247
break;

src/components/fields/TraceSelector.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@ class TraceSelector extends Component {
4747
}
4848

4949
setTraceDefaults(container, fullContainer, updateContainer) {
50-
if (
51-
container &&
52-
container.uid &&
53-
!container.mode &&
54-
fullContainer.type === 'scatter'
55-
) {
50+
if (container && !container.mode && fullContainer.type === 'scatter') {
5651
updateContainer({
5752
type: 'scatter',
5853
mode: fullContainer.mode || 'markers',

src/lib/connectTraceToPlot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function connectTraceToPlot(WrappedComponent) {
3131

3232
let fullTrace = {};
3333
for (let i = 0; i < fullData.length; i++) {
34-
if (trace.uid === fullData[i]._fullInput._input.uid) {
34+
if (traceIndexes[0] === fullData[i]._fullInput.index) {
3535
/*
3636
* Fit transforms are custom transforms in our custom plotly.js bundle,
3737
* they are different from others as they create an extra trace in the

src/lib/connectTransformToTrace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function connectTransformToTrace(WrappedComponent) {
5555
this.context.onUpdate({
5656
type: EDITOR_ACTIONS.DELETE_TRANSFORM,
5757
payload: {
58-
traceUid: this.context.fullContainer._input.uid,
58+
traceIndex: this.context.fullContainer.index,
5959
transformIndex: this.props.transformIndex,
6060
},
6161
});

0 commit comments

Comments
 (0)