mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Removed accessing private flyout.width_ variable.
This commit is contained in:
@@ -272,7 +272,7 @@ Blockly.Mutator.prototype.setVisible = function(visible) {
|
||||
this.rootBlock_.setDeletable(false);
|
||||
if (this.workspace_.flyout_) {
|
||||
var margin = this.workspace_.flyout_.CORNER_RADIUS * 2;
|
||||
var x = this.workspace_.flyout_.width_ + margin;
|
||||
var x = this.workspace_.getFlyout_().getWidth() + margin;
|
||||
} else {
|
||||
var margin = 16;
|
||||
var x = margin;
|
||||
@@ -385,9 +385,10 @@ Blockly.Mutator.prototype.workspaceChanged_ = function() {
|
||||
Blockly.Mutator.prototype.getFlyoutMetrics_ = function() {
|
||||
return {
|
||||
viewHeight: this.workspaceHeight_,
|
||||
viewWidth: this.workspaceWidth_ - this.workspace_.flyout_.width_,
|
||||
viewWidth: this.workspaceWidth_ - this.workspace_.getFlyout_().getWidth(),
|
||||
absoluteTop: 0,
|
||||
absoluteLeft: this.workspace_.RTL ? 0 : this.workspace_.flyout_.width_
|
||||
absoluteLeft: this.workspace_.RTL ? 0 :
|
||||
this.workspace_.getFlyout_().getWidth()
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1733,9 +1733,9 @@ Blockly.WorkspaceSvg.prototype.zoomToFit = function() {
|
||||
// Convert from pixels to workspace coordinates.
|
||||
blocksHeight += this.flyout_.height_ / this.scale;
|
||||
} else {
|
||||
workspaceWidth += this.flyout_.width_;
|
||||
workspaceWidth += this.flyout_.getWidth();
|
||||
// Convert from pixels to workspace coordinates.
|
||||
blocksWidth += this.flyout_.width_ / this.scale;
|
||||
blocksWidth += this.flyout_.getWidth() / this.scale;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user