Migrate hideChaff() from Blockly to WorkspaceSvg (#5460)

* Add hideChaff() to core/workspace_svg.js

* Mark Blockly.hideChaff as deprecated

* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in core

* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in demos

* Style and formatting fixes

* Switch from accessor to stub wrapper for Blockly.hideChaff

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
This commit is contained in:
Aaron Dodson
2021-09-15 13:41:20 -07:00
committed by GitHub
parent 0e43ddc4ba
commit 6a4a359f7b
20 changed files with 73 additions and 58 deletions

View File

@@ -774,7 +774,7 @@ Scrollbar.prototype.onMouseUpHandle_ = function() {
* @private
*/
Scrollbar.prototype.cleanUp_ = function() {
Blockly.hideChaff(true);
this.workspace_.hideChaff(true);
if (Scrollbar.onMouseUpWrapper_) {
browserEvents.unbind(Scrollbar.onMouseUpWrapper_);
Scrollbar.onMouseUpWrapper_ = null;