mirror of
https://github.com/google/blockly.git
synced 2026-01-13 20:07:08 +01:00
Merge pull request #329 from picklesrus/doubleclick
Add event preventDefault() calls to the end of zoom button handlers s…
This commit is contained in:
@@ -1100,6 +1100,7 @@ Blockly.WorkspaceSvg.prototype.zoomReset = function(e) {
|
||||
}
|
||||
// This event has been handled. Don't start a workspace drag.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -166,10 +166,12 @@ Blockly.ZoomControls.prototype.createDom = function() {
|
||||
Blockly.bindEvent_(zoominSvg, 'mousedown', null, function(e) {
|
||||
workspace.zoomCenter(1);
|
||||
e.stopPropagation(); // Don't start a workspace scroll.
|
||||
e.preventDefault();
|
||||
});
|
||||
Blockly.bindEvent_(zoomoutSvg, 'mousedown', null, function(e) {
|
||||
workspace.zoomCenter(-1);
|
||||
e.stopPropagation(); // Don't start a workspace scroll.
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
return this.svgGroup_;
|
||||
|
||||
Reference in New Issue
Block a user