From 848ec34a0aef90bafe46c2cbee9b5f761d002f99 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Thu, 22 Jul 2021 08:16:19 -0700 Subject: [PATCH] clang-format core/block_dragger.js --- core/block_dragger.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/core/block_dragger.js b/core/block_dragger.js index 40436a4e1..e97457d22 100644 --- a/core/block_dragger.js +++ b/core/block_dragger.js @@ -142,8 +142,7 @@ const initIconData = function(block) { * disconnecting. * @public */ -BlockDragger.prototype.startDrag = function( - currentDragDeltaXY, healStack) { +BlockDragger.prototype.startDrag = function(currentDragDeltaXY, healStack) { if (!getGroup()) { setGroup(true); } @@ -182,7 +181,7 @@ BlockDragger.prototype.startDrag = function( */ BlockDragger.prototype.shouldDisconnect_ = function(healStack) { return !!( - this.draggingBlock_.getParent() || + this.draggingBlock_.getParent() || (healStack && this.draggingBlock_.nextConnection && this.draggingBlock_.nextConnection.targetBlock())); }; @@ -312,12 +311,10 @@ BlockDragger.prototype.endDrag = function(e, currentDragDeltaXY) { * end up. * @protected */ -BlockDragger.prototype.getNewLocationAfterDrag_ = function( - currentDragDeltaXY) { +BlockDragger.prototype.getNewLocationAfterDrag_ = function(currentDragDeltaXY) { const newValues = {}; newValues.delta = this.pixelsToWorkspaceUnits_(currentDragDeltaXY); - newValues.newLocation = - Coordinate.sum(this.startXY_, newValues.delta); + newValues.newLocation = Coordinate.sum(this.startXY_, newValues.delta); return newValues; }; @@ -379,7 +376,7 @@ BlockDragger.prototype.updateToolboxStyle_ = function(isEnd) { if (toolbox) { const style = this.draggingBlock_.isDeletable() ? 'blocklyToolboxDelete' : - 'blocklyToolboxGrab'; + 'blocklyToolboxGrab'; if (isEnd && typeof toolbox.removeStyle == 'function') { toolbox.removeStyle(style); @@ -395,8 +392,7 @@ BlockDragger.prototype.updateToolboxStyle_ = function(isEnd) { * @protected */ BlockDragger.prototype.fireMoveEvent_ = function() { - const event = - new (get(BLOCK_MOVE))(this.draggingBlock_); + const event = new (get(BLOCK_MOVE))(this.draggingBlock_); event.oldCoordinate = this.startXY_; event.recordNew(); fire(event); @@ -467,8 +463,6 @@ BlockDragger.prototype.getInsertionMarkers = function() { return []; }; -register( - Type.BLOCK_DRAGGER, DEFAULT, - BlockDragger); +register(Type.BLOCK_DRAGGER, DEFAULT, BlockDragger); exports = BlockDragger;