@@ -28,8 +28,6 @@ import * as registry from './registry.js';
2828import { Coordinate } from './utils/coordinate.js' ;
2929import * as dom from './utils/dom.js' ;
3030import type { WorkspaceSvg } from './workspace_svg.js' ;
31- import { hasBubble } from './interfaces/i_has_bubble.js' ;
32- import * as deprecation from './utils/deprecation.js' ;
3331import * as layers from './layers.js' ;
3432
3533/**
@@ -51,12 +49,6 @@ export class BlockDragger implements IBlockDragger {
5149 protected wouldDeleteBlock_ = false ;
5250 protected startXY_ : Coordinate ;
5351
54- /**
55- * @deprecated To be removed in v11. Updating icons is now handled by the
56- * block's `moveDuringDrag` method.
57- */
58- protected dragIconData_ : IconPositionData [ ] = [ ] ;
59-
6052 /**
6153 * @param block The block to drag.
6254 * @param workspace The workspace to drag on.
@@ -76,8 +68,6 @@ export class BlockDragger implements IBlockDragger {
7668 * beginning of the drag in workspace coordinates.
7769 */
7870 this . startXY_ = this . draggingBlock_ . getRelativeToSurfaceXY ( ) ;
79-
80- this . dragIconData_ = initIconData ( block , this . startXY_ ) ;
8171 }
8272
8373 /**
@@ -86,7 +76,6 @@ export class BlockDragger implements IBlockDragger {
8676 * @internal
8777 */
8878 dispose ( ) {
89- this . dragIconData_ . length = 0 ;
9079 if ( this . draggedConnectionManager_ ) {
9180 this . draggedConnectionManager_ . dispose ( ) ;
9281 }
@@ -398,16 +387,6 @@ export class BlockDragger implements IBlockDragger {
398387 return result ;
399388 }
400389
401- /**
402- * Move all of the icons connected to this drag.
403- *
404- * @deprecated To be removed in v11. This is now handled by the block's
405- * `moveDuringDrag` method.
406- */
407- protected dragIcons_ ( ) {
408- deprecation . warn ( 'Blockly.BlockDragger.prototype.dragIcons_' , 'v10' , 'v11' ) ;
409- }
410-
411390 /**
412391 * Get a list of the insertion markers that currently exist. Drags have 0, 1,
413392 * or 2 insertion markers.
@@ -432,38 +411,4 @@ export interface IconPositionData {
432411 icon : Icon ;
433412}
434413
435- /**
436- * Make a list of all of the icons (comment, warning, and mutator) that are
437- * on this block and its descendants. Moving an icon moves the bubble that
438- * extends from it if that bubble is open.
439- *
440- * @param block The root block that is being dragged.
441- * @param blockOrigin The top left of the given block in workspace coordinates.
442- * @returns The list of all icons and their locations.
443- */
444- function initIconData (
445- block : BlockSvg ,
446- blockOrigin : Coordinate ,
447- ) : IconPositionData [ ] {
448- // Build a list of icons that need to be moved and where they started.
449- const dragIconData = [ ] ;
450-
451- for ( const icon of block . getIcons ( ) ) {
452- // Only bother to track icons whose bubble is visible.
453- if ( hasBubble ( icon ) && ! icon . bubbleIsVisible ( ) ) continue ;
454-
455- dragIconData . push ( { location : blockOrigin , icon : icon } ) ;
456- icon . onLocationChange ( blockOrigin ) ;
457- }
458-
459- for ( const child of block . getChildren ( false ) ) {
460- dragIconData . push (
461- ...initIconData ( child , Coordinate . sum ( blockOrigin , child . relativeCoords ) ) ,
462- ) ;
463- }
464- // AnyDuringMigration because: Type '{ location: Coordinate | null; icon:
465- // Icon; }[]' is not assignable to type 'IconPositionData[]'.
466- return dragIconData as AnyDuringMigration ;
467- }
468-
469414registry . register ( registry . Type . BLOCK_DRAGGER , registry . DEFAULT , BlockDragger ) ;
0 commit comments