-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
modeBar styling #3068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modeBar styling #3068
Changes from 12 commits
1b7c126
947eaf2
212612b
3795223
e870e34
a4d3948
61d1c7b
1d4ac7e
ff9d801
397a6de
baeb1bc
254f158
f9e8777
fc47c72
0046f12
b7c2355
31d6fb2
97f25e2
dc7877b
f5cc0e9
452f9bc
266d63b
ff3f9f6
db9edd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
top: 2px; | ||
right: 2px; | ||
z-index: 1001; | ||
background: rgba(255,255,255,0.7); | ||
} | ||
|
||
.modebar--hover { | ||
|
@@ -23,17 +22,13 @@ | |
position: relative; | ||
vertical-align: middle; | ||
white-space: nowrap; | ||
|
||
&:first-child { | ||
margin-left: 0px; | ||
} | ||
} | ||
|
||
|
||
.modebar-btn { | ||
position: relative; | ||
font-size: 16px; | ||
padding: 3px 4px; | ||
height: 22px; | ||
/* display: inline-block; including this breaks 3d interaction in .embed mode. Chrome bug? */ | ||
cursor: pointer; | ||
line-height: normal; | ||
|
@@ -44,19 +39,21 @@ | |
top: 2px; | ||
} | ||
|
||
path { | ||
fill: rgba(0,31,95,0.3); | ||
} | ||
&.modebar-btn--logo { | ||
|
||
&.active path, &:hover path { | ||
fill: rgba(0,22,72,0.5); | ||
} | ||
} | ||
|
||
&.modebar-btn--logo { | ||
padding: 3px 1px; | ||
.modebar.vertical { | ||
.modebar-group { | ||
display: block; | ||
float: none; | ||
margin-left: 0px; | ||
margin-top: 8px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch 👀 ! No, it's not on purpose. I'd rather have the logo at the top. Fixing this right now! |
||
|
||
path { | ||
fill: $color-brand-primary !important; | ||
.modebar-btn { | ||
display:block; | ||
text-align: center; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,5 +224,30 @@ module.exports = { | |
'or a logo image, for example. To omit one of these items on the plot,', | ||
'make an item with matching `templateitemname` and `visible: false`.' | ||
].join(' ') | ||
}, | ||
modeBarStyle: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no 🐫 in data/layout attributes! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... but wait do we really want to make these layout attributes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ha I see, @alexcjohnson , @nicolaskruchten and @jackparmer have agreed on making these layout attributes in #3063. Not much I can say I guess. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you could chime in on how we should name those attributes. I didn't realize there was no 🐫 in data/layout attributes! 😳 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd vote for: modebar: {
orientation: 'h' | 'v',
bgcolor: '',
color: /* implied icon color */,
activecolor: /* just like we currently use for rangeselector */
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I vote for @etpinard's suggestion. What do you guys think? @alexcjohnson @nicolaskruchten @jackparmer |
||
orientation: { | ||
valType: 'enumerated', | ||
values: ['v', 'h'], | ||
dflt: 'h', | ||
role: 'info', | ||
editType: 'modebar', | ||
description: 'Sets the orientation of the modebar.' | ||
}, | ||
bgcolor: { | ||
valType: 'color', | ||
role: 'style', | ||
dflt: 'rgba(255, 255, 255, 0.7)', | ||
editType: 'modebar', | ||
description: 'Sets the background color of the modebar.' | ||
}, | ||
iconColor: { | ||
valType: 'color', | ||
role: 'style', | ||
dflt: 'rgba(0, 31, 95, 0.3)', | ||
editType: 'modebar', | ||
description: 'Sets the color of the icons in the modebar.' | ||
}, | ||
editType: 'modebar' | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we trim those
\n
and spaces?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by commit dc7877b