start of comments

This commit is contained in:
George Michael Brower 2014-08-18 17:56:05 -04:00
parent a4ef8f0b83
commit a6854f4e69
7 changed files with 29 additions and 10 deletions

View File

@ -13,10 +13,8 @@ knob-size = 6px
font-size: 0; font-size: 0;
height: 100%; height: 100%;
user-select: none;\ user-select: none;\
} }
#track-container { #track-container {
width: 100%; width: 100%;
height: track-height; height: track-height;

View File

@ -43,7 +43,9 @@ Polymer('gui-panel', {
if ( typeof object == 'object' ) { if ( typeof object == 'object' ) {
controller.object = object; controller.object = object;
controller.property = property; controller.property = property;
} } else {
controller.value = value;
}
row.name = property; row.name = property;

View File

@ -7,7 +7,6 @@
right: 20px; right: 20px;
width: 270px; width: 270px;
} }
#closeButton { #closeButton {

View File

@ -25,8 +25,6 @@
</div> </div>
<div id="comment" <div id="comment"
on-mouseover="{{ openComment }}"
on-mouseout="{{ closeComment }}"
class="open-{{ commentOpen }}" hidden?="{{ comment == null }}"> class="open-{{ commentOpen }}" hidden?="{{ comment == null }}">
<div id="commentInner">{{ comment }}</div> <div id="commentInner">{{ comment }}</div>

View File

@ -17,10 +17,12 @@ Polymer('gui-row', {
}, },
openComment: function() { openComment: function() {
this.commentOpen = true;
this.$.comment.style.height = this.$.commentInner.offsetHeight + 'px'; this.$.comment.style.height = this.$.commentInner.offsetHeight + 'px';
}, },
closeComment: function() { closeComment: function() {
this.commentOpen = false;
this.$.comment.style.height = ''; this.$.comment.style.height = '';
} }

View File

@ -24,14 +24,30 @@
user-select: text; user-select: text;
background: #E0CF99; background: #E0CF99;
height: 0;
color: #333; color: #333;
// box-shadow: inset 0 2px 0 dark;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
transition: height 0.15s ease; 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 );
} }

View File

@ -21,10 +21,14 @@ document.addEventListener( 'polymer-ready', function() {
gui.add( object, 'listen4Free' ).name( 'customName' ) 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, '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( 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.' );
}); });