MCPcopy Create free account
hub / github.com/plotly/plotly.js / styleTextInSelectionMode

Function styleTextInSelectionMode

src/traces/bar/style.js:77–95  ·  view source on GitHub ↗
(txs, trace, gd)

Source from the content-addressed store, hash-verified

75}
76
77function styleTextInSelectionMode(txs, trace, gd) {
78 txs.each(function(d) {
79 var tx = d3.select(this);
80 var font;
81
82 if(d.selected) {
83 font = Lib.ensureUniformFontSize(gd, determineFont(tx, d, trace, gd));
84
85 var selectedFontColor = trace.selected.textfont && trace.selected.textfont.color;
86 if(selectedFontColor) {
87 font.color = selectedFontColor;
88 }
89
90 Drawing.font(tx, font);
91 } else {
92 Drawing.selectedTextStyle(tx, trace);
93 }
94 });
95}
96
97function determineFont(tx, d, trace, gd) {
98 var layoutFont = gd._fullLayout.font;

Callers 1

Calls 1

determineFontFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…