Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 212612b

Browse filesBrowse files
committed
specify default style in modebar tests
1 parent 947eaf2 commit 212612b
Copy full SHA for 212612b

File tree

Expand file treeCollapse file tree

2 files changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-1
lines changed

‎src/components/modebar/modebar.js

Copy file name to clipboardExpand all lines: src/components/modebar/modebar.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ proto.createButton = function(config) {
163163
if(config.toggle) d3.select(button).classed('active', true);
164164

165165
var icon = config.icon;
166-
if(config.color) icon.color = config.color;
167166
if(typeof icon === 'function') {
168167
button.appendChild(icon());
169168
}
170169
else {
170+
if(icon) icon.color = config.color;
171171
button.appendChild(this.createIcon(icon || Icons.question));
172172
}
173173
button.setAttribute('data-gravity', config.gravity || 'n');

‎test/jasmine/tests/modebar_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/modebar_test.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ describe('ModeBar', function() {
3838
_context: {
3939
displaylogo: true,
4040
displayModeBar: true,
41+
modeBarStyle: {
42+
orientation: 'h',
43+
bgcolor: 'rgba(255,255,255,0.7)',
44+
iconColor: 'rgba(0, 31, 95, 0.3)'
45+
},
4146
modeBarButtonsToRemove: [],
4247
modeBarButtonsToAdd: [],
4348
locale: 'en',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.