https://codepen.io/cpsievert/pen/Rxzzzz
cc @dfcreative
Interestingly Plotly.restyle(gd, {"marker.opacity": 0.1}); seems to work fine, as does the trace.opacity attribute on the initial draw - it's just Plotly.restyle(gd, {"opacity": 0.1}); that fails.
@dfcreative you probably just have to explicitly define opacity in scattergl/attributes, like we do in eg surface/attributes so you can get editType: 'calc' instead of editType: 'style' that you get from the base opacity attribute. And assuming that fixes it, take a quick spin through the rest of those base attributes and see if anything else is broken the same way.
Better yet, maybe we could make ScatterGl.style handle trace opacity updates.
@alexcjohnson thank, fixed in https://github.com/plotly/plotly.js/pull/2311/commits/a9d387aa14d3e2ade6768bcd2bbc20dcc22782b3. Making ScatterGl.styleto do options recalculation (that is required to update opacity, since resulting opacity depends on trace.opacity, marker.opacity and color alpha) would be unnecessary complexity and mostly duplication.