-
+
+
+
+
+
diff --git a/elements/gui-row/gui-row.js b/elements/gui-row/gui-row.js
index cc7e58f..a8c6f47 100644
--- a/elements/gui-row/gui-row.js
+++ b/elements/gui-row/gui-row.js
@@ -1,7 +1,27 @@
+/*
+
+[ ] comment hover behavior
+
+*/
+
Polymer('gui-row', {
+ comment: null,
+
+ commentOpen: false,
+
ready: function() {
-
+
+
+
+ },
+
+ openComment: function() {
+ this.$.comment.style.height = this.$.commentInner.offsetHeight + 'px';
+ },
+
+ closeComment: function() {
+ this.$.comment.style.height = '';
}
});
\ No newline at end of file
diff --git a/elements/gui-row/gui-row.styl b/elements/gui-row/gui-row.styl
index 75a1b61..2160808 100644
--- a/elements/gui-row/gui-row.styl
+++ b/elements/gui-row/gui-row.styl
@@ -1,20 +1,73 @@
-@import 'shared';
+@import '../shared';
+
+
+:host {
+
+ user-select: none;
+ background: #1a1a1a;
+
+ height: 100%;
+ width: 100%;
+ display: block;
+
+ font();
+
+}
#row {
- -webkit-text-select: none;
- background: #1a1a1a;
+
+}
+
+#comment {
+
+ line-height: 16px;
+ user-select: text;
+
+ background: #E0CF99;
+ height: 0;
+ color: #333;
+
+
+ box-sizing: border-box;
+ overflow: hidden;
+ transition: height 0.15s ease;
+ box-shadow: inset 0 2px 0 dark;
+
+}
+
+#commentInner {
+ padding: padding;
}
#name {
- font();
-
text-overflow: ellipsis;
word-wrap: break-word;
overflow: hidden;
- width: 33%;
- padding: 0 10px;
+ padding: 0 padding;
box-sizing: border-box;
+ display: inline-block;
+ width: 40%;
+
+ height: 30px;
+ line-height: 30px;
+
+ cursor: default;
+
+ .comment-true & {
+ cursor: pointer;
+ }
+
}
+.comment-true #nameInner {
+ display: inline-block;
+ border-bottom: 1px dotted light;
+
+ &:after {
+ content: ' ?';
+ color: light;
+ }
+
+}
\ No newline at end of file
diff --git a/elements/shared.styl b/elements/shared.styl
index ad04acc..831e136 100644
--- a/elements/shared.styl
+++ b/elements/shared.styl
@@ -2,6 +2,8 @@
number-color = #25a0d8
+padding = 10px
+
ease = cubic-bezier( .25, .25, 0, 1 )
light = rgba( 255, 255, 255, 0.25 )
diff --git a/index.js b/index.js
index 326da70..43958ca 100644
--- a/index.js
+++ b/index.js
@@ -1,21 +1,30 @@
var object = {
- "listen4Free": 25,
+ "listen4Free": 0,
"step": 10,
"straddleZero": 0,
"maxIsNegative": -2,
+ "hasComment": 0
};
// How do we kill polymer-ready ...
document.addEventListener( 'polymer-ready', function() {
var gui = new GUI();
+
gui.add( object, 'listen4Free' );
gui.add( object, 'listen4Free' );
gui.add( object, 'listen4Free' );
- gui.add( object, 'listen4Free' ).name( 'customName' );
- gui.add( object, 'step', 0, 50, 5 );
- gui.add( object, 'straddleZero', -1, 1, 0.01 );
+
+ gui.add( object, 'hasComment' ).comment( 'Hi there.' );
- var c = gui.add( object, 'maxIsNegative', -5, -2 );
+ gui.add( -2, 'anonymousSlider', -5, -2 );
+
+ 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, '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 );
});
\ No newline at end of file