- esc key to close popup
This commit is contained in:
parent
32e9fe7de6
commit
91b487312a
4 changed files with 25 additions and 34 deletions
|
|
@ -60,8 +60,8 @@ init = function(callback) {
|
|||
// or if mouse is on h-scrollbar
|
||||
$('.tab').on('mousewheel',function(e) {
|
||||
// console.log(e)
|
||||
var h = $('#container').innerHeight()-20-$(this).parents('.tab').length*5;
|
||||
if ($(this).get(0).scrollHeight+20 == $(this).height()) {
|
||||
var h = $('#container').innerHeight()-10-$(this).parents('.tab').length*5;
|
||||
if ($(this).get(0).scrollHeight+10 == $(this).height()) {
|
||||
$(this).scrollLeft($(this).scrollLeft()+e.originalEvent.deltaY);
|
||||
e.preventDefault();
|
||||
} else if (e.pageY>=h) {
|
||||
|
|
@ -70,8 +70,6 @@ init = function(callback) {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// sidepanel
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ parsewidgets = function(widgets,parent) {
|
|||
for (widgetId in widgets) {
|
||||
var widgetData = widgets[widgetId]
|
||||
|
||||
var color = widgetData.color?'style="background:'+widgetData.color+'"':'';
|
||||
var color = widgetData.color?'style="color:'+widgetData.color+'"':'';
|
||||
var title = widgetData.title || widgetId;
|
||||
var type = widgetData.type || 'fader'
|
||||
widgetData.path = widgetData.path || '/' + widgetId
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ createPopup = function(title,content) {
|
|||
popup.find('.popup-content').append(content)
|
||||
$('body').append(popup)
|
||||
|
||||
$(document).on('keydown.popup', function(){
|
||||
popup.close()
|
||||
$(document).on('keydown.popup', function(e){
|
||||
if (e.keyCode==27) popup.close()
|
||||
})
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue