dat.gui/elements/controller-string/controller-string.js

27 lines
322 B
JavaScript
Raw Normal View History

2014-09-04 04:14:36 +00:00
/* globals Gui, Polymer */
'use strict';
Gui.register('controller-string', function(value) {
2014-08-27 00:01:15 +00:00
return typeof value == 'string';
2014-08-27 00:01:15 +00:00
});
2014-08-27 00:01:15 +00:00
Polymer('controller-string', {
2014-08-27 00:01:15 +00:00
click: function(e) {
2014-09-03 16:52:28 +00:00
this.$.input.select();
2014-09-03 16:52:28 +00:00
},
2014-09-03 16:52:28 +00:00
keydown: function(e) {
2014-09-03 16:52:28 +00:00
if (e.keyCode == 13) {
this.$.input.blur();
2014-09-03 16:52:28 +00:00
}
}
});