Skip to content

Commit d7a78a3

Browse files
authored
Merge pull request #705 from plotly/split-trace-fix
Split trace fix
2 parents d346149 + ad2cd9c commit d7a78a3

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

src/components/widgets/SymbolSelector.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ export default class SymbolSelector extends Component {
8181
<div
8282
className="symbol-selector__item"
8383
key={value}
84-
onClick={() => this.props.onChange(value)}
84+
onClick={() => {
85+
this.props.onChange(value);
86+
this.togglePanel();
87+
}}
8588
>
8689
<svg
8790
width="28"

src/lib/connectTraceToPlot.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ export default function connectTraceToPlot(WrappedComponent) {
125125
)
126126
: null;
127127

128+
const containsAnSrc =
129+
Object.keys(update).filter(a => a.endsWith('src')).length > 0;
130+
128131
if (Array.isArray(update)) {
129132
update.forEach((u, i) => {
130133
this.context.onUpdate({
@@ -136,7 +139,7 @@ export default function connectTraceToPlot(WrappedComponent) {
136139
},
137140
});
138141
});
139-
} else if (splitTraceGroup) {
142+
} else if (splitTraceGroup && !containsAnSrc) {
140143
this.props.traceIndexes.forEach((t, i) => {
141144
this.context.onUpdate({
142145
type: EDITOR_ACTIONS.UPDATE_TRACES,

src/styles/components/containers/_modalbox.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@
3030
position: relative;
3131
}
3232
}
33+
34+
.field .modalbox {
35+
width: 100%;
36+
left: -1px;
37+
top: 100%;
38+
}

src/styles/components/widgets/_trace-type-selector.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ $item-size: 90px;
171171
&__label {
172172
font-weight: var(--font-weight-semibold);
173173
width: $item-size * 0.8;
174+
height: 34px;
174175
margin-top: var(--spacing-half-unit);
175176
color: var(--color-text-base);
176177
text-transform: capitalize;

0 commit comments

Comments
 (0)