mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Merge pull request #3147 from rachel-fenichel/misc_cleanup
Misc cleanup
This commit is contained in:
@@ -48,7 +48,7 @@ Blockly.FlyoutButton = function(workspace, targetWorkspace, xml, isLabel) {
|
||||
this.workspace_ = workspace;
|
||||
|
||||
/**
|
||||
* @type {!Blockly.Workspace}
|
||||
* @type {!Blockly.WorkspaceSvg}
|
||||
* @private
|
||||
*/
|
||||
this.targetWorkspace_ = targetWorkspace;
|
||||
@@ -234,13 +234,10 @@ Blockly.FlyoutButton.prototype.dispose = function() {
|
||||
}
|
||||
if (this.svgGroup_) {
|
||||
Blockly.utils.dom.removeNode(this.svgGroup_);
|
||||
this.svgGroup_ = null;
|
||||
}
|
||||
if (this.svgText_) {
|
||||
this.workspace_.getThemeManager().unsubscribe(this.svgText_);
|
||||
}
|
||||
this.workspace_ = null;
|
||||
this.targetWorkspace_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -921,7 +921,7 @@ Blockly.WorkspaceSvg.prototype.updateScreenCalculationsIfScrolled =
|
||||
|
||||
/**
|
||||
* Get the SVG element that forms the drawing surface.
|
||||
* @return {!Element} SVG element.
|
||||
* @return {!SVGElement} SVG element.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.getCanvas = function() {
|
||||
return this.svgBlockCanvas_;
|
||||
@@ -937,7 +937,7 @@ Blockly.WorkspaceSvg.prototype.getBubbleCanvas = function() {
|
||||
|
||||
/**
|
||||
* Get the SVG element that contains this workspace.
|
||||
* @return {Element} SVG element.
|
||||
* @return {SVGElement} SVG element.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.getParentSvg = function() {
|
||||
if (this.cachedParentSvg_) {
|
||||
@@ -949,7 +949,7 @@ Blockly.WorkspaceSvg.prototype.getParentSvg = function() {
|
||||
this.cachedParentSvg_ = element;
|
||||
return element;
|
||||
}
|
||||
element = element.parentNode;
|
||||
element = /** @type {!SVGElement} */ (element.parentNode);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
@@ -31,10 +31,14 @@ goog.require('Blockly.utils.dom');
|
||||
|
||||
/**
|
||||
* Class for a zoom controls.
|
||||
* @param {!Blockly.Workspace} workspace The workspace to sit in.
|
||||
* @param {!Blockly.WorkspaceSVG} workspace The workspace to sit in.
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.ZoomControls = function(workspace) {
|
||||
/**
|
||||
* @type {!Blockly.WorkspaceSvg}
|
||||
* @private
|
||||
*/
|
||||
this.workspace_ = workspace;
|
||||
};
|
||||
|
||||
@@ -128,9 +132,7 @@ Blockly.ZoomControls.prototype.init = function(verticalSpacing) {
|
||||
Blockly.ZoomControls.prototype.dispose = function() {
|
||||
if (this.svgGroup_) {
|
||||
Blockly.utils.dom.removeNode(this.svgGroup_);
|
||||
this.svgGroup_ = null;
|
||||
}
|
||||
this.workspace_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user