Skip to content

Commit

Permalink
Merge pull request #6397 from plotly/fix6396-static-slider-cursor
Browse files Browse the repository at this point in the history
no resize cursor on static sliders
  • Loading branch information
archmoj authored Dec 16, 2022
2 parents 897fb0a + 4e4023e commit dbd5caf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions draftlogs/6397_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Avoid displaying resize cursor on static sliders [[#6397](https://github.com/plotly/plotly.js/pull/6397)]
3 changes: 2 additions & 1 deletion src/components/sliders/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var FROM_TL = alignmentConstants.FROM_TL;
var FROM_BR = alignmentConstants.FROM_BR;

module.exports = function draw(gd) {
var staticPlot = gd._context.staticPlot;
var fullLayout = gd._fullLayout;
var sliderData = makeSliderData(fullLayout, gd);

Expand All @@ -27,7 +28,7 @@ module.exports = function draw(gd) {

sliders.enter().append('g')
.classed(constants.containerClassName, true)
.style('cursor', 'ew-resize');
.style('cursor', staticPlot ? null : 'ew-resize');

function clearSlider(sliderOpts) {
if(sliderOpts._commandObserver) {
Expand Down

0 comments on commit dbd5caf

Please sign in to comment.