Skip to content

Commit

Permalink
feat(cursor): added cursor pointer/not-allowed for table and leaflet …
Browse files Browse the repository at this point in the history
…map (#285)

UIC-2462
  • Loading branch information
avantika-karwasara authored Apr 15, 2020
1 parent 60f4323 commit 3eb9905
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions superset/assets/src/visualizations/LeafletMap/LeafletMap.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@
text-align: center;
margin-left: 2px;
}

.click-not-allowed{
cursor: not-allowed !important;
}
3 changes: 2 additions & 1 deletion superset/assets/src/visualizations/LeafletMap/LeafletMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ function LeafletMap(element, props) {
color: getRgbColor(formData.strokeColorPicker),
weight: MARKER_WEIGHT,
opacity: MARKER_OPACITY,
fillOpacity: formData.cellSize
fillOpacity: formData.cellSize,
className: enableClick ? '' : 'click-not-allowed'
}
}

Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/visualizations/Table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function TableVis(element, props) {
cellNodeClicked.classed('filtered', !cellNodeClicked.classed('filtered'));
}
})
.style('cursor', d => (!d.isMetric) ? 'pointer' : '')
.style('cursor', tableFilter ? (d => (!d.isMetric) ? 'pointer' : '') : 'not-allowed')
.html(d => d.html ? d.html : d.val);

let publishColumnsKeyValueMap = {}
Expand Down

0 comments on commit 3eb9905

Please sign in to comment.