mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
committed by
Sam El-Husseini
parent
dad8738e75
commit
e6e63f456b
@@ -79,6 +79,14 @@ Blockly.Bubble = function(workspace, content, shape, anchorXY,
|
||||
*/
|
||||
this.onMouseDownResizeWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Describes whether this bubble has been disposed of (nodes and event
|
||||
* listeners removed from the page) or not.
|
||||
* @type {boolean}
|
||||
* @package
|
||||
*/
|
||||
this.disposed = false;
|
||||
|
||||
var angle = Blockly.Bubble.ARROW_ANGLE;
|
||||
if (this.workspace_.RTL) {
|
||||
angle = -angle;
|
||||
@@ -796,24 +804,15 @@ Blockly.Bubble.prototype.setColour = function(hexColour) {
|
||||
* Dispose of this bubble.
|
||||
*/
|
||||
Blockly.Bubble.prototype.dispose = function() {
|
||||
Blockly.Bubble.unbindDragEvents_();
|
||||
// Dispose of and unlink the bubble.
|
||||
Blockly.utils.dom.removeNode(this.bubbleGroup_);
|
||||
if (this.onMouseDownBubbleWrapper_) {
|
||||
Blockly.unbindEvent_(this.onMouseDownBubbleWrapper_);
|
||||
this.onMouseDownBubbleWrapper_ = null;
|
||||
}
|
||||
if (this.onMouseDownResizeWrapper_) {
|
||||
Blockly.unbindEvent_(this.onMouseDownResizeWrapper_);
|
||||
this.onMouseDownResizeWrapper_ = null;
|
||||
}
|
||||
this.bubbleGroup_ = null;
|
||||
this.bubbleArrow_ = null;
|
||||
this.bubbleBack_ = null;
|
||||
this.resizeGroup_ = null;
|
||||
this.workspace_ = null;
|
||||
this.content_ = null;
|
||||
this.shape_ = null;
|
||||
Blockly.Bubble.unbindDragEvents_();
|
||||
Blockly.utils.dom.removeNode(this.bubbleGroup_);
|
||||
this.disposed = true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user