This commit is contained in:
yumoqing 2025-09-05 12:10:08 +08:00
parent 436767035f
commit ce834b86c8
2 changed files with 9 additions and 6 deletions

View File

@ -24,7 +24,7 @@ bricks.HScrollPanel = class extends bricks.HBox {
constructor(opts){ constructor(opts){
opts.width = '100%'; opts.width = '100%';
opts.height = '100%'; opts.height = '100%';
opts.css = 'scrollpanel'; opts.css = opts.css + ' scrollpanel';
opts.overflow = 'auto'; opts.overflow = 'auto';
super(opts); super(opts);
this.min_threshold = opts.min_threshold || 0.01; this.min_threshold = opts.min_threshold || 0.01;
@ -66,7 +66,7 @@ bricks.VScrollPanel = class extends bricks.VBox {
constructor(opts){ constructor(opts){
opts.width = '100%'; opts.width = '100%';
opts.height = '100%'; opts.height = '100%';
opts.css = 'scrollpanel'; opts.css = opts.css + ' scrollpanel';
opts.overflow = 'auto'; opts.overflow = 'auto';
super(opts); super(opts);
this.min_threshold = opts.min_threshold || 0.02; this.min_threshold = opts.min_threshold || 0.02;

View File

@ -264,10 +264,13 @@ bricks.JsWidget = class {
this.dom_element.classList.remove(css); this.dom_element.classList.remove(css);
} }
set_css(css, remove_flg){ set_css(css, remove_flg){
var arr = csses.split(' ');
arr.forEach(c => {
if (!remove_flg){ if (!remove_flg){
this.dom_element.classList.add(css); this.dom_element.classList.add(c);
} else { } else {
this.dom_element.classList.remove(css); this.dom_element.classList.remove(c);
}
} }
} }
set_cssObject(cssobj){ set_cssObject(cssobj){