diff --git a/bricks/datarow.js b/bricks/datarow.js index d32d14a..8bbd31b 100644 --- a/bricks/datarow.js +++ b/bricks/datarow.js @@ -116,12 +116,7 @@ bricks.DataRow = class extends bricks.HBox { opts.user_data = this.user_data; opts.value = opts.tip = this.user_data[f.name]; } - var cwidth = cwidths[f.name]; - if (cwidth){ - opts.cwidth = cwidth; - } else { - opts.cwidth = 10; - } + opts.cwidth = cwidths[f.name] ||f.cwidth || 10; var f = bricks.get_ViewBuilder(f.uitype); if (!f) f = bricks.get_ViewBuilder('str'); var w = f(opts); diff --git a/bricks/popup.js b/bricks/popup.js index f7bb225..f33b8e2 100644 --- a/bricks/popup.js +++ b/bricks/popup.js @@ -171,7 +171,7 @@ bricks.Popup = class extends bricks.VBox { var rect = this.showRectage(); this.offsetX = e.clientX - rect.left; this.offsetY = e.clientY - rect.top; - console.log(rect, '========', this.offsetX, this.offsetY, e.clientX, e.clientY); + // console.log(rect, '========', this.offsetX, this.offsetY, e.clientX, e.clientY); bricks.Body.bind('mouseup', this.stop_moving.bind(this)); bricks.Body.bind('touchend', this.stop_moving.bind(this)); @@ -192,7 +192,7 @@ bricks.Popup = class extends bricks.VBox { var cx, cy; cx = e.clientX - this.offsetX; cy = e.clientY - this.offsetY; - console.log(cx, cy, e.clientX, e.clientY, this.offsetX, this.offsetY, '=========='); + // console.log(cx, cy, e.clientX, e.clientY, this.offsetX, this.offsetY, '=========='); this.set_style('left', cx + 'px'); this.set_style('top', cy + 'px'); e.preventDefault(); @@ -215,7 +215,7 @@ bricks.Popup = class extends bricks.VBox { if (this.auto_open){ this.open(); } else { - console.log('auto_open is ', this.auto_open, ' so not auto open it', this.opts, w); + // console.log('auto_open is ', this.auto_open, ' so not auto open it', this.opts, w); } } open(){ @@ -299,7 +299,7 @@ bricks.PopupWindow = class extends bricks.Popup { this.content_w.set_css('flexbox'); this.auto_open = true; filler.add_widget(this.content_w); - console.log(this.auto_open, 'opts=', opts); + // console.log(this.auto_open, 'opts=', opts); } async load_content(){ var dic = { @@ -364,13 +364,13 @@ bricks.PopupWindow = class extends bricks.Popup { this.auto_open = ao; } add_widget(w, index){ - console.log('auto_open=', this.auto_open); + // console.log('auto_open=', this.auto_open); this.content_w.add_widget(w, index); if (this.auto_open){ this.open(); } else { this.open(); - console.log('auto_open is false, not auto open'); + // console.log('auto_open is false, not auto open'); } } open(){