mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Merge pull request #2323 from BeksOmega/fixes/ScrollBinding
Fixed Scroll Event Binding to Work with Multiple Workspaces
This commit is contained in:
@@ -441,9 +441,14 @@ Blockly.inject.bindDocumentEvents_ = function() {
|
||||
Blockly.hideChaff();
|
||||
Blockly.Touch.clearTouchIdentifier(); // Don't block future drags.
|
||||
});
|
||||
Blockly.bindEventWithChecks_(document, 'scroll', null,
|
||||
Blockly.mainWorkspace.updateInverseScreenCTM
|
||||
.bind(Blockly.mainWorkspace));
|
||||
Blockly.bindEventWithChecks_(document, 'scroll', null, function() {
|
||||
for (var workspaceId in Blockly.Workspace.WorkspaceDB_) {
|
||||
var workspace = Blockly.Workspace.WorkspaceDB_[workspaceId];
|
||||
if (workspace.updateInverseScreenCTM) {
|
||||
workspace.updateInverseScreenCTM();
|
||||
}
|
||||
}
|
||||
});
|
||||
Blockly.bindEventWithChecks_(document, 'keydown', null, Blockly.onKeyDown_);
|
||||
// longStop needs to run to stop the context menu from showing up. It
|
||||
// should run regardless of what other touch event handlers have run.
|
||||
|
||||
Reference in New Issue
Block a user