This commit is contained in:
yumoqing 2025-12-31 17:10:09 +08:00
parent a8c4d7e145
commit d5f94735c9

View File

@ -161,8 +161,10 @@ bricks.Popup = class extends bricks.VBox {
this.current_width = this.current_width || this.get_width(); this.current_width = this.current_width || this.get_width();
this.current_height = this.current_height || this.get_height(); this.current_height = this.current_height || this.get_height();
this.resize_status = true; this.resize_status = true;
bricks.app.bind('mousemove', this.resizing_bound = this.resizing.bind(this)); document.addEventListener('mousemove',
bricks.app.bind('mouseup', this.stop_resizing_bound = this.stop_resizing.bind(this)); this.resizing_bound = this.resizing.bind(this));
document.addEventListener('mouseup',
this.stop_resizing_bound = this.stop_resizing.bind(this));
console.log('= resize_stat_pos()', this.origin_event_x, this.origin_event_y) console.log('= resize_stat_pos()', this.origin_event_x, this.origin_event_y)
} }
resizing(e){ resizing(e){
@ -209,8 +211,11 @@ bricks.Popup = class extends bricks.VBox {
this.resize_status = false; this.resize_status = false;
this.is_resizing = false; this.is_resizing = false;
this.forget_event_pos(); this.forget_event_pos();
if (this.resizing_bound) bricks.app.unbind('mousemove', this.resizing.bind(this)); if (this.resizing_bound)
if (this.stop_resizing_bound) bricks.app.unbind('mouseup', this.stop_resizing.bind(this)); document.removeEventListener('mousemove', this.resizing_bound);
if (this.stop_resizing_bound)
document.removeEventListener('mouseup', this.stop_resizing_bound);
console.log('= stop_resizing() called '); console.log('= stop_resizing() called ');
} }