no message

This commit is contained in:
George Michael Brower 2014-08-23 23:03:17 -07:00
parent a84421e81d
commit 327d038f34
10 changed files with 181 additions and 55 deletions

View File

@ -482,6 +482,7 @@ if(f)g=void 0;else if(f=g[this.name],!f)return void console.error("Cannot find f
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
} }
#row { #row {
border: 1px solid #00f;
height: 30px; height: 30px;
-webkit-transition: background-color 0.2s linear; -webkit-transition: background-color 0.2s linear;
-moz-transition: background-color 0.2s linear; -moz-transition: background-color 0.2s linear;
@ -497,9 +498,7 @@ if(f)g=void 0;else if(f=g[this.name],!f)return void console.error("Cannot find f
height: 100%; height: 100%;
} }
#name { #name {
-o-text-overflow: ellipsis; border: 1px solid #f0f;
text-overflow: ellipsis;
word-wrap: break-word;
overflow: hidden; overflow: hidden;
padding: 0 8px; padding: 0 8px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
@ -507,11 +506,18 @@ if(f)g=void 0;else if(f=g[this.name],!f)return void console.error("Cannot find f
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
width: 40%; width: 40%;
height: 100%;
cursor: default; cursor: default;
} }
.comment-true #name { .comment-true #name {
cursor: pointer; cursor: pointer;
} }
#nameInner {
border: 1px solid #f00;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
word-wrap: break-word;
}
#comment { #comment {
line-height: 16px; line-height: 16px;
-webkit-user-select: text; -webkit-user-select: text;
@ -571,8 +577,10 @@ if(f)g=void 0;else if(f=g[this.name],!f)return void console.error("Cannot find f
<div id="row" class="comment-{{ comment != null }}" layout="" horizontal="" center=""> <div id="row" class="comment-{{ comment != null }}" layout="" horizontal="" center="">
<div id="name" on-mouseover="{{ openComment }}" on-mouseout="{{ closeComment }}"> <div id="name" on-mouseover="{{ openComment }}" on-mouseout="{{ closeComment }}" layout="" horizontal="" center="">
<div id="nameInner">{{ name }}</div> <div id="nameInner">{{ name }}</div>
</div> </div>
<div id="controller" flex=""> <div id="controller" flex="">
@ -632,12 +640,26 @@ Polymer('gui-row', {
font: 10px 'Lucida Grande', sans-serif; font: 10px 'Lucida Grande', sans-serif;
color: #eee; color: #eee;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
color: text-color;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
padding: 6px 8px; padding: 6px 8px;
background: #000; background: #000;
} }
#closeButton:hover {
background: #1a1a1a;
}
#closeButtonDocked {
position: absolute;
left: -40px;
border: 1px solid #00f;
top: 0;
color: #000;
width: 40px;
height: 40px;
}
#controllers {
overflow: auto;
}
#container { #container {
background: #1a1a1a; background: #1a1a1a;
-webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0.8, 0, 1); -webkit-transition: -webkit-transform 0.4s cubic-bezier(0, 0.8, 0, 1);
@ -651,23 +673,36 @@ Polymer('gui-row', {
position: fixed; position: fixed;
top: 0; top: 0;
} }
#container.docked-false { #container.autoplace-true.docked-false {
right: 20px; right: 20px;
} }
#container.docked-true { #container.autoplace-true.docked-true {
right: 0; right: 0;
bottom: 0; bottom: 0;
overflow: auto; }
#container.autoplace-true.docked-true.open-false {
-webkit-transform: translate3d(245px, 0, 0);
-moz-transform: translate3d(245px, 0, 0);
-o-transform: translate3d(245px, 0, 0);
-ms-transform: translate3d(245px, 0, 0);
transform: translate3d(245px, 0, 0);
} }
</style> </style>
<div id="container" class="docked-{{ docked }} autoplace-{{ autoPlace }} open-{{ open }}"> <div id="container" class="docked-{{ docked }} autoplace-{{ autoPlace }} open-{{ open }}">
<div id="controllers"> <div id="controllers">
<content></content> <content></content>
</div> </div>
<div id="closeButton" on-tap="{{ tapClose }}" hidden?="{{ docked }}">{{ open ? &apos;Close&apos; : &apos;Open&apos; }} Controls</div> <div id="closeButton" on-tap="{{ tapClose }}" hidden?="{{ docked }}">{{ open ? &apos;Close&apos; : &apos;Open&apos; }} Controls</div>
<div id="closeButtonDocked" on-tap="{{ tapClose }}" hidden?="{{ !docked }}"></div>
</div> </div>
</template> </template>
@ -752,18 +787,37 @@ Polymer('gui-panel', {
}, },
// Observers
// -------------------------------
openChanged: function() { openChanged: function() {
var y; if ( this.open || this.docked ) {
if ( this.open ) {
y = 0; // let the style sheet take care of things
this.$.container.style.transform = '';
} else { } else {
y = -this.$.controllers.offsetHeight + 'px';
} // todo: need the rest of the vendor prefixes ...
// wish i could pipe javascript variables into styl.
var y = -this.$.controllers.offsetHeight + 'px';
this.$.container.style.transform = 'translate3d(0, ' + y + ', 0)'; this.$.container.style.transform = 'translate3d(0, ' + y + ', 0)';
}
}, },
dockedChanged: function() {
this.openChanged();
},
// Events // Events
// ------------------------------- // -------------------------------
@ -781,6 +835,7 @@ Polymer('gui-panel', {
}, },
// Legacy // Legacy
// ------------------------------- // -------------------------------
@ -790,7 +845,7 @@ Polymer('gui-panel', {
}, },
// domElement // todo: domElement
});</script> });</script>
@ -1163,13 +1218,7 @@ Polymer( 'controller-number', {
<template> <template>
<style>:host { <style>#container {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#container {
height: 100%; height: 100%;
} }
#track-container { #track-container {
@ -1246,7 +1295,7 @@ input {
transition: width 0.2s cubic-bezier(0.25, 0.25, 0, 1); transition: width 0.2s cubic-bezier(0.25, 0.25, 0, 1);
} }
.slider-true input:hover { .slider-true input:hover {
width: 28%; width: 33%;
} }
.slider-true input:focus { .slider-true input:focus {
width: 50%; width: 50%;
@ -1255,7 +1304,7 @@ input {
width: 100%; width: 100%;
} }
input::selection { input::selection {
background-color: rgba(255,255,255,0.1); background-color: #25a0d8;
} }
</style> </style>
@ -1345,7 +1394,7 @@ Polymer( 'controller-boolean', {
height: 100%; height: 100%;
} }
#input { #input {
height: 20px; vertical-align: middle;
} }
</style> </style>

View File

@ -3,10 +3,7 @@
<script src="controller-boolean.js"></script> <script src="controller-boolean.js"></script>
<polymer-element <polymer-element name="controller-boolean" extends="controller-base">
name="controller-boolean"
extends="controller-base"
>
<template> <template>

View File

@ -11,5 +11,5 @@
} }
#input { #input {
height: 20px; vertical-align: middle;
} }

View File

@ -7,10 +7,6 @@ track-size = 1px;
fill-size = 1px; fill-size = 1px;
knob-size = 6px knob-size = 6px
:host {
user-select: none;
}
#container { #container {
height: 100%; height: 100%;
} }
@ -109,5 +105,5 @@ input {
} }
input::selection { input::selection {
background-color: rgba( 255, 255, 255, 0.1 ); background-color: number-color;
} }

View File

@ -10,12 +10,19 @@
<link rel="stylesheet" href="gui-panel.css"> <link rel="stylesheet" href="gui-panel.css">
<div id="container" class="docked-{{ docked }} autoplace-{{ autoPlace }} open-{{ open }}"> <div id="container" class="docked-{{ docked }} autoplace-{{ autoPlace }} open-{{ open }}">
<div id="controllers"> <div id="controllers">
<content></content> <content></content>
</div> </div>
<div id="closeButton" on-tap="{{ tapClose }}" hidden?="{{ docked }}">{{ open ? 'Close' : 'Open' }} Controls</div> <div id="closeButton" on-tap="{{ tapClose }}" hidden?="{{ docked }}">{{ open ? 'Close' : 'Open' }} Controls</div>
<div id="closeButtonDocked" on-tap="{{ tapClose }}" hidden?="{{ !docked }}"></div>
</div> </div>
</template> </template>
</div> </div>

View File

@ -78,18 +78,37 @@ Polymer('gui-panel', {
}, },
// Observers
// -------------------------------
openChanged: function() { openChanged: function() {
var y; if ( this.open || this.docked ) {
if ( this.open ) {
y = 0; // let the style sheet take care of things
this.$.container.style.transform = '';
} else { } else {
y = -this.$.controllers.offsetHeight + 'px';
} // todo: need the rest of the vendor prefixes ...
// wish i could pipe javascript variables into styl.
var y = -this.$.controllers.offsetHeight + 'px';
this.$.container.style.transform = 'translate3d(0, ' + y + ', 0)'; this.$.container.style.transform = 'translate3d(0, ' + y + ', 0)';
}
}, },
dockedChanged: function() {
this.openChanged();
},
// Events // Events
// ------------------------------- // -------------------------------
@ -107,6 +126,7 @@ Polymer('gui-panel', {
}, },
// Legacy // Legacy
// ------------------------------- // -------------------------------
@ -116,6 +136,6 @@ Polymer('gui-panel', {
}, },
// domElement // todo: domElement
}); });

View File

@ -4,35 +4,78 @@
panel-font() panel-font()
color: text-color;
// font-size: 14px; // font-size: 14px;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
padding: padding * 0.75 padding; padding: padding * 0.75 padding;
background: black; background: black;
&:hover {
background: panel-color;
}
}
#closeButtonDocked {
position: absolute;
left: -40px;
border: 1px solid blue;
top: 0;
color: black;
width: 40px;
height: 40px;
}
#controllers {
overflow: auto;
} }
#container { #container {
background: panel-color; background: panel-color;
transition: transform 0.4s cubic-bezier( 0, 0.8, 0, 1 );
&.autoplace-true { &.autoplace-true {
width: panel-width; width: panel-width;
position: fixed; position: fixed;
top: 0; top: 0;
}
&.docked-false { &.docked-false {
right: 20px; right: 20px;
&.open-true {
}
&.open-false {
}
} }
&.docked-true { &.docked-true {
right: 0; right: 0;
bottom: 0; bottom: 0;
overflow: auto;
}
transition: transform 0.4s cubic-bezier( 0, 0.8, 0, 1 ); &.open-true {
}
&.open-false {
transform: translate3d( panel-width, 0, 0 );
}
}
}
} }

View File

@ -14,8 +14,11 @@
id="name" id="name"
on-mouseover="{{ openComment }}" on-mouseover="{{ openComment }}"
on-mouseout="{{ closeComment }}" on-mouseout="{{ closeComment }}"
layout horizontal center
> >
<div id="nameInner">{{ name }}</div> <div id="nameInner">{{ name }}</div>
</div> </div>
<div id="controller" flex> <div id="controller" flex>

View File

@ -34,14 +34,12 @@
debug( magenta ) debug( magenta )
text-overflow: ellipsis;
word-wrap: break-word;
overflow: hidden; overflow: hidden;
padding: 0 padding; padding: 0 padding;
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
width: 40%; width: 40%;
height: 100%;
cursor: default; cursor: default;
.comment-true & { .comment-true & {
@ -50,6 +48,16 @@
} }
#nameInner {
debug( red );
text-overflow: ellipsis;
word-wrap: break-word;
}
#comment { #comment {

View File

@ -35,7 +35,10 @@
gui = new dat.GUI(); gui = new dat.GUI();
gui.docked = true;
gui.add( gui, 'docked' ); gui.add( gui, 'docked' );
gui.add( gui, 'open' );
gui.add( object, 'listen4Free' ); gui.add( object, 'listen4Free' );
gui.add( object, 'listen4Free' ); gui.add( object, 'listen4Free' );