mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
start of comments
This commit is contained in:
parent
a4ef8f0b83
commit
a6854f4e69
@ -13,10 +13,8 @@ knob-size = 6px
|
||||
font-size: 0;
|
||||
height: 100%;
|
||||
user-select: none;\
|
||||
|
||||
}
|
||||
|
||||
|
||||
#track-container {
|
||||
width: 100%;
|
||||
height: track-height;
|
||||
|
@ -43,7 +43,9 @@ Polymer('gui-panel', {
|
||||
if ( typeof object == 'object' ) {
|
||||
controller.object = object;
|
||||
controller.property = property;
|
||||
}
|
||||
} else {
|
||||
controller.value = value;
|
||||
}
|
||||
|
||||
row.name = property;
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
right: 20px;
|
||||
width: 270px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#closeButton {
|
||||
|
@ -25,8 +25,6 @@
|
||||
</div>
|
||||
|
||||
<div id="comment"
|
||||
on-mouseover="{{ openComment }}"
|
||||
on-mouseout="{{ closeComment }}"
|
||||
class="open-{{ commentOpen }}" hidden?="{{ comment == null }}">
|
||||
|
||||
<div id="commentInner">{{ comment }}</div>
|
||||
|
@ -17,10 +17,12 @@ Polymer('gui-row', {
|
||||
},
|
||||
|
||||
openComment: function() {
|
||||
this.commentOpen = true;
|
||||
this.$.comment.style.height = this.$.commentInner.offsetHeight + 'px';
|
||||
},
|
||||
|
||||
closeComment: function() {
|
||||
this.commentOpen = false;
|
||||
this.$.comment.style.height = '';
|
||||
}
|
||||
|
||||
|
@ -24,14 +24,30 @@
|
||||
user-select: text;
|
||||
|
||||
background: #E0CF99;
|
||||
height: 0;
|
||||
color: #333;
|
||||
// box-shadow: inset 0 2px 0 dark;
|
||||
|
||||
|
||||
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
transition: height 0.15s ease;
|
||||
box-shadow: inset 0 2px 0 dark;
|
||||
|
||||
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
pointer-events: none;
|
||||
|
||||
opacity: 0;
|
||||
transform: translate3d( 10px, 20px, 0 );
|
||||
|
||||
transition: all 0.2s ease;
|
||||
|
||||
}
|
||||
|
||||
#comment.open-true {
|
||||
|
||||
opacity: 1;
|
||||
transform: translate3d( 10px, 0, 0 );
|
||||
|
||||
}
|
||||
|
||||
|
6
index.js
6
index.js
@ -21,10 +21,14 @@ document.addEventListener( 'polymer-ready', function() {
|
||||
|
||||
gui.add( object, 'listen4Free' ).name( 'customName' )
|
||||
|
||||
gui.add( object, 'step', 0, 50, 5 ).comment( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper dui metus, sed aliquet nulla fermentum nec. Sed massa felis, congue nec libero ut, condimentum hendrerit purus. Cras a cursus ante. Integer nec nibh vitae lacus convallis viverra in at urna. Donec hendrerit convallis lacus, nec condimentum neque aliquam ac. Sed suscipit leo vel ligula condimentum scelerisque. Aliquam fermentum sagittis nisi vitae accumsan. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In et dolor eros. Sed vel venenatis odio, quis porta mi. Ut sed commodo velit, in porta ante.' );
|
||||
// gui.add( object, 'step', 0, 50, 5 ).comment( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper dui metus, sed aliquet nulla fermentum nec. Sed massa felis, congue nec libero ut, condimentum hendrerit purus. Cras a cursus ante. Integer nec nibh vitae lacus convallis viverra in at urna. Donec hendrerit convallis lacus, nec condimentum neque aliquam ac. Sed suscipit leo vel ligula condimentum scelerisque. Aliquam fermentum sagittis nisi vitae accumsan. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In et dolor eros. Sed vel venenatis odio, quis porta mi. Ut sed commodo velit, in porta ante.' );
|
||||
|
||||
gui.add( object, 'straddleZero', -1, 1, 0.01 ).comment( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam semper dui metus, sed aliquet nulla fermentum nec. ' );;
|
||||
|
||||
gui.add( object, 'maxIsNegative', -5, -2 );
|
||||
|
||||
// gui.add( 32, 'beats', 1, 64, 1 ).comment( 'The number of beats in the song.');
|
||||
// gui.add( 0, 'loops', -2, 2, 1 ).comment( 'The number of times the gif loops in a cycle.' );
|
||||
// gui.add( 0, 'start', -2, 2, 1 ).comment( 'The frame of the gif where the song should start.' );
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user