bugfix
This commit is contained in:
parent
5f957fb1d2
commit
15e64a16f9
@ -33,14 +33,16 @@ bricks.TabPanel = class extends bricks.Layout {
|
||||
this.content_container = new bricks.VFiller({});
|
||||
if (this.opts.tab_pos == 'top' || this.opts.tab_pos == 'bottom'){
|
||||
this.set_css('vbox');
|
||||
var height = this.opts.tab_wide || 'auto';
|
||||
this.tab_container = new bricks.VBox({height:height});
|
||||
this.tab_container.dom_element.style.width = this.opts.tab_long || '100%';
|
||||
this.tab_container = new bricks.VBox({
|
||||
height:'auto',
|
||||
width:'auto'
|
||||
});
|
||||
} else {
|
||||
this.set_css('hbox');
|
||||
var width= this.opts.tab_wide || 'auto';
|
||||
this.tab_container = new bricks.VBox({width:width});
|
||||
this.tab_container.dom_element.style.height = this.opts.tab_long || '100%';
|
||||
this.tab_container = new bricks.VBox({
|
||||
width:'auto',
|
||||
height:'auto'
|
||||
});
|
||||
}
|
||||
if (this.opts.tab_pos == 'top' || this.opts.tab_pos == 'left'){
|
||||
this.add_widget(this.tab_container);
|
||||
|
@ -2,7 +2,15 @@ var bricks = window.bricks || {};
|
||||
bricks.isMobile = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
|
||||
bricks.is_mobile = function(){
|
||||
return typeof screen.orientation !== 'undefined';
|
||||
var userAgent = navigator.userAgent;
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)) {
|
||||
return true;
|
||||
}
|
||||
if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class _TypeIcons {
|
||||
|
@ -8,22 +8,22 @@
|
||||
"tools":[
|
||||
{
|
||||
"name":"c",
|
||||
"Label":"C",
|
||||
"label":"C",
|
||||
"icon":null
|
||||
},
|
||||
{
|
||||
"name":"javascript",
|
||||
"Label":"JavaScript",
|
||||
"label":"JavaScript",
|
||||
"icon":null
|
||||
},
|
||||
{
|
||||
"name":"php",
|
||||
"Label":"PHP",
|
||||
"label":"PHP",
|
||||
"icon":null
|
||||
},
|
||||
{
|
||||
"name":"python",
|
||||
"Label":"Python",
|
||||
"label":"Python",
|
||||
"icon":null
|
||||
},
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user