Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/components/legend/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ module.exports = function draw(gd, opts) {
if(title.text) {
var titleEl = Lib.ensureSingle(scrollBox, 'text', 'legendtitletext');
titleEl.attr('text-anchor', 'start')
.classed('user-select-none', true)
.call(Drawing.font, title.font)
.text(title.text);

Expand Down Expand Up @@ -410,7 +409,6 @@ function drawTexts(g, gd, opts) {
var textEl = Lib.ensureSingle(g, 'text', 'legendtext');

textEl.attr('text-anchor', 'start')
.classed('user-select-none', true)
.call(Drawing.font, opts.font)
.text(isEditable ? ensureLength(name, maxNameLength) : name);

Expand Down
3 changes: 1 addition & 2 deletions src/components/rangeselector/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ function drawButtonText(button, selectorLayout, d, gd) {
}

var text = Lib.ensureSingle(button, 'text', 'selector-text', function(s) {
s.classed('user-select-none', true)
.attr('text-anchor', 'middle');
s.attr('text-anchor', 'middle');
});

text.call(Drawing.font, selectorLayout.font)
Expand Down
18 changes: 8 additions & 10 deletions src/components/sliders/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,10 @@ function drawCurrentValue(sliderGroup, sliderOpts, valueOverride) {
}

var text = Lib.ensureSingle(sliderGroup, 'text', constants.labelClass, function(s) {
s.classed('user-select-none', true)
.attr({
'text-anchor': textAnchor,
'data-notex': 1
});
s.attr({
'text-anchor': textAnchor,
'data-notex': 1
});
});

var str = sliderOpts.currentvalue.prefix ? sliderOpts.currentvalue.prefix : '';
Expand Down Expand Up @@ -357,11 +356,10 @@ function drawGrip(sliderGroup, gd, sliderOpts) {

function drawLabel(item, data, sliderOpts) {
var text = Lib.ensureSingle(item, 'text', constants.labelClass, function(s) {
s.classed('user-select-none', true)
.attr({
'text-anchor': 'middle',
'data-notex': 1
});
s.attr({
'text-anchor': 'middle',
'data-notex': 1
});
});

var tx = data.step.label;
Expand Down
12 changes: 5 additions & 7 deletions src/components/updatemenus/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ function drawHeader(gd, gHeader, gButton, scrollBox, menuOpts) {

// draw drop arrow at the right edge
var arrow = Lib.ensureSingle(gHeader, 'text', constants.headerArrowClassName, function(s) {
s.classed('user-select-none', true)
.attr('text-anchor', 'end')
s.attr('text-anchor', 'end')
.call(Drawing.font, menuOpts.font)
.text(constants.arrowSymbol[menuOpts.direction]);
});
Expand Down Expand Up @@ -435,11 +434,10 @@ function drawItemRect(item, menuOpts) {

function drawItemText(item, menuOpts, itemOpts, gd) {
var text = Lib.ensureSingle(item, 'text', constants.itemTextClassName, function(s) {
s.classed('user-select-none', true)
.attr({
'text-anchor': 'start',
'data-notex': 1
});
s.attr({
'text-anchor': 'start',
'data-notex': 1
});
});

var tx = itemOpts.label;
Expand Down
4 changes: 3 additions & 1 deletion src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3717,13 +3717,15 @@ function makePlotFramework(gd) {

// Plot container
fullLayout._container = gd3.selectAll('.plot-container').data([0]);
fullLayout._container.enter().insert('div', ':first-child')
fullLayout._container.enter()
.insert('div', ':first-child')
.classed('plot-container', true)
.classed('plotly', true);

// Make the svg container
fullLayout._paperdiv = fullLayout._container.selectAll('.svg-container').data([0]);
fullLayout._paperdiv.enter().append('div')
.classed('user-select-none', true)
.classed('svg-container', true)
.style('position', 'relative');

Expand Down
5 changes: 0 additions & 5 deletions src/plots/gl2d/scene2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@ proto.makeFramework = function() {

this.updateSize(canvas);

// disabling user select on the canvas
// sanitizes double-clicks interactions
// ref: https://github.com/plotly/plotly.js/issues/744
canvas.className += ' user-select-none';

// create SVG container for hover text
var svgContainer = this.svgContainer = document.createElementNS(
'http://www.w3.org/2000/svg',
Expand Down
1 change: 0 additions & 1 deletion src/traces/carpet/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ function drawAxisTitle(gd, layer, trace, t, xy, dxy, axis, xa, ya, labelOrientat
'rotate(' + orientation.angle + ') ' +
'translate(0,' + offset + ')'
)
.classed('user-select-none', true)
.attr('text-anchor', 'middle')
.call(Drawing.font, axis.title.font);
});
Expand Down