From dd9619dc9494c4e83fa7cad21ec6db61577e5ddb Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 15 May 2024 17:44:13 +0000 Subject: [PATCH] fix: extra insertion markers being created (#8120) * fix: extra insertion markers being created * chore: remove unused value --- core/insertion_marker_previewer.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/core/insertion_marker_previewer.ts b/core/insertion_marker_previewer.ts index 8998985a2..c4038c0c6 100644 --- a/core/insertion_marker_previewer.ts +++ b/core/insertion_marker_previewer.ts @@ -15,15 +15,6 @@ import * as registry from './registry.js'; import {Renderer as ZelosRenderer} from './renderers/zelos/renderer.js'; import {ConnectionType} from './connection_type.js'; -/** - * An error message to throw if the block created by createMarkerBlock_ is - * missing any components. - */ -const DUPLICATE_BLOCK_ERROR = - 'The insertion marker previewer tried to create a marker but the result ' + - 'is missing a connection. If you are using a mutator, make sure your ' + - 'domToMutation method is properly defined.'; - export class InsertionMarkerPreviewer implements IConnectionPreviewer { private readonly workspace: WorkspaceSvg; @@ -88,16 +79,6 @@ export class InsertionMarkerPreviewer implements IConnectionPreviewer { eventUtils.disable(); try { this.hidePreview(); - const dragged = draggedConn.getSourceBlock(); - const marker = this.createInsertionMarker(dragged); - const markerConn = this.getMatchingConnection( - dragged, - marker, - draggedConn, - ); - if (!markerConn) { - throw Error(DUPLICATE_BLOCK_ERROR); - } // TODO(7898): Instead of special casing, we should change the dragger to // track the change in distance between the dragged connection and the