mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
fix slider CSS problem
This commit is contained in:
parent
58fb13576b
commit
907f316e9c
4401
build/dat.gui.js
4401
build/dat.gui.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
build/dat.gui.min.js
vendored
8
build/dat.gui.min.js
vendored
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@
|
|||||||
import NumberController from './NumberController';
|
import NumberController from './NumberController';
|
||||||
import dom from '../dom/dom';
|
import dom from '../dom/dom';
|
||||||
import css from '../utils/css';
|
import css from '../utils/css';
|
||||||
import styleSheet from '!style!css!sass!./NumberControllerSlider.scss';
|
import styleSheet from '!css!sass!./NumberControllerSlider.scss';
|
||||||
|
|
||||||
function map(v, i1, i2, o1, o2) {
|
function map(v, i1, i2, o1, o2) {
|
||||||
return o1 + (o2 - o1) * ((v - i1) / (i2 - i1));
|
return o1 + (o2 - o1) * ((v - i1) / (i2 - i1));
|
||||||
@ -97,7 +97,7 @@ class NumberControllerSlider extends NumberController {
|
|||||||
* Injects default stylesheet for slider elements.
|
* Injects default stylesheet for slider elements.
|
||||||
*/
|
*/
|
||||||
NumberControllerSlider.useDefaultStyles = function() {
|
NumberControllerSlider.useDefaultStyles = function() {
|
||||||
css.inject(styleSheet);
|
css.inject(styleSheet.toString());
|
||||||
};
|
};
|
||||||
|
|
||||||
export default NumberControllerSlider;
|
export default NumberControllerSlider;
|
||||||
|
@ -14,18 +14,14 @@
|
|||||||
.slider {
|
.slider {
|
||||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
|
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
|
||||||
height: 1em;
|
height: 1em;
|
||||||
border-radius: 1em;
|
border-radius: 1em 0 0 1em;
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
padding: 0 0.5em;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider-fg {
|
.slider-fg {
|
||||||
padding: 1px 0 2px 0;
|
|
||||||
background-color: #aaa;
|
background-color: #aaa;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
margin-left: -0.5em;
|
margin-left: -0.5em;
|
||||||
padding-right: 0.5em;
|
|
||||||
border-radius: 1em 0 0 1em;
|
border-radius: 1em 0 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,8 +32,8 @@
|
|||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
content: '';
|
content: '';
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: -1em;
|
margin-right: -0.5em;
|
||||||
margin-top: -1px;
|
margin-top: 3px;
|
||||||
height: 0.9em;
|
height: 0.9em;
|
||||||
width: 0.9em;
|
width: 0.9em;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user