Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function(e) {
if (Blockly.isRightButton(e)) {
// Right-click. Don't create a block, let the context menu show.
return;
}
if (duplicateBlock.disabled) {
// Beyond capacity.
return;
}
duplicateBlock.isInFlyout = false;
Blockly.unbindEvent_(mousedownEvent);
duplicateBlock.hideTooltip = null;
Blockly.Tooltip.hide();
duplicateBlock.onMouseDown_(e);
duplicateBlock = null;
}
);
BlocklyDialogs.dialogUnbindDragEvents_ = function() {
if (BlocklyDialogs.dialogMouseUpWrapper_) {
Blockly.unbindEvent_(BlocklyDialogs.dialogMouseUpWrapper_);
BlocklyDialogs.dialogMouseUpWrapper_ = null;
}
if (BlocklyDialogs.dialogMouseMoveWrapper_) {
Blockly.unbindEvent_(BlocklyDialogs.dialogMouseMoveWrapper_);
BlocklyDialogs.dialogMouseMoveWrapper_ = null;
}
};
BlocklyDialogs.hideDialog = function(opt_animate) {
if (!BlocklyDialogs.isDialogVisible_) {
return;
}
BlocklyDialogs.dialogUnbindDragEvents_();
if (BlocklyDialogs.dialogMouseDownWrapper_) {
Blockly.unbindEvent_(BlocklyDialogs.dialogMouseDownWrapper_);
BlocklyDialogs.dialogMouseDownWrapper_ = null;
}
BlocklyDialogs.isDialogVisible_ = false;
BlocklyDialogs.dialogDispose_ && BlocklyDialogs.dialogDispose_();
BlocklyDialogs.dialogDispose_ = null;
var origin = (opt_animate === false) ? null : BlocklyDialogs.dialogOrigin_;
var dialog = document.getElementById('dialog');
var shadow = document.getElementById('dialogShadow');
shadow.style.opacity = 0;
function endResult() {
shadow.style.zIndex = -1;
shadow.style.visibility = 'hidden';
var border = document.getElementById('dialogBorder');
BlocklyDialogs.dialogUnbindDragEvents_ = function() {
if (BlocklyDialogs.dialogMouseUpWrapper_) {
Blockly.unbindEvent_(BlocklyDialogs.dialogMouseUpWrapper_);
BlocklyDialogs.dialogMouseUpWrapper_ = null;
}
if (BlocklyDialogs.dialogMouseMoveWrapper_) {
Blockly.unbindEvent_(BlocklyDialogs.dialogMouseMoveWrapper_);
BlocklyDialogs.dialogMouseMoveWrapper_ = null;
}
};