Skip to content

Commit fa73561

Browse files
committed
disable sankey dragging + build dist files
1 parent 3f37635 commit fa73561

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

dist/plotly.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -191862,7 +191862,9 @@ module.exports = function(gd, svg, calcData, layout, callbacks) {
191862191862
switch(d.arrangement) {
191863191863
case 'fixed': return 'default';
191864191864
case 'perpendicular': return 'ns-resize';
191865-
default: return 'move';
191865+
// default: return 'move';
191866+
// change cursor to default instead of drag 'move' cursor
191867+
default: return 'default';
191866191868
}
191867191869
});
191868191870

@@ -191881,8 +191883,9 @@ module.exports = function(gd, svg, calcData, layout, callbacks) {
191881191883
.style('opacity', function(n) { return ((gd._context.staticPlot || firstRender) && !n.partOfGroup) ? 1 : 0;});
191882191884

191883191885
sankeyNode
191884-
.call(attachPointerEvents, sankey, callbacks.nodeEvents)
191885-
.call(attachDragHandler, sankeyLink, callbacks, gd); // has to be here as it binds sankeyLink
191886+
.call(attachPointerEvents, sankey, callbacks.nodeEvents);
191887+
// disable dragging on sankey plot
191888+
// .call(attachDragHandler, sankeyLink, callbacks, gd); // has to be here as it binds sankeyLink
191886191889

191887191890
sankeyNode
191888191891
.transition()

dist/plotly.min.js

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/traces/sankey/render.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,9 @@ module.exports = function(gd, svg, calcData, layout, callbacks) {
924924
switch(d.arrangement) {
925925
case 'fixed': return 'default';
926926
case 'perpendicular': return 'ns-resize';
927-
default: return 'move';
927+
// default: return 'move';
928+
// change cursor to default instead of drag 'move' cursor
929+
default: return 'default';
928930
}
929931
});
930932

@@ -943,8 +945,9 @@ module.exports = function(gd, svg, calcData, layout, callbacks) {
943945
.style('opacity', function(n) { return ((gd._context.staticPlot || firstRender) && !n.partOfGroup) ? 1 : 0;});
944946

945947
sankeyNode
946-
.call(attachPointerEvents, sankey, callbacks.nodeEvents)
947-
.call(attachDragHandler, sankeyLink, callbacks, gd); // has to be here as it binds sankeyLink
948+
.call(attachPointerEvents, sankey, callbacks.nodeEvents);
949+
// disable dragging on sankey plot
950+
// .call(attachDragHandler, sankeyLink, callbacks, gd); // has to be here as it binds sankeyLink
948951

949952
sankeyNode
950953
.transition()

0 commit comments

Comments
 (0)