mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Move browser event utils from utils.js to browser_events.js (#5464)
* fix: move browser event utils to browserEvents * fix: mark browser event utils in utils as deprecated * fix: move uses of browser event funcs to browserEvents * fix: remove browserEvents definition of noEvent * fix: add renames for browser event utils * docs: add suggested alternatives for browser event utils * fix: change deprecations to stubs * fix: PR comments
This commit is contained in:
@@ -21,7 +21,6 @@ const Touch = goog.require('Blockly.Touch');
|
||||
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
const browserEvents = goog.require('Blockly.browserEvents');
|
||||
const object = goog.require('Blockly.utils.object');
|
||||
const utils = goog.require('Blockly.utils');
|
||||
|
||||
|
||||
/*
|
||||
@@ -284,7 +283,7 @@ TouchGesture.prototype.handlePinch_ = function(e) {
|
||||
gestureScale * TouchGesture.ZOOM_IN_MULTIPLIER :
|
||||
gestureScale * TouchGesture.ZOOM_OUT_MULTIPLIER;
|
||||
const workspace = this.startWorkspace_;
|
||||
const position = utils.mouseToSvg(
|
||||
const position = browserEvents.mouseToSvg(
|
||||
e, workspace.getParentSvg(), workspace.getInverseScreenCTM());
|
||||
workspace.zoom(position.x, position.y, delta);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user