File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -671,6 +671,24 @@ export class BlockSvg
671671 }
672672 }
673673
674+ /**
675+ * Add a CSS class to the SVG group of this block.
676+ *
677+ * @param className
678+ */
679+ addClass ( className : string ) {
680+ dom . addClass ( this . svgGroup_ , className ) ;
681+ }
682+
683+ /**
684+ * Remove a CSS class from the SVG group of this block.
685+ *
686+ * @param className
687+ */
688+ removeClass ( className : string ) {
689+ dom . removeClass ( this . svgGroup_ , className ) ;
690+ }
691+
674692 /**
675693 * Recursively adds or removes the dragging class to this node and its
676694 * children.
@@ -683,10 +701,10 @@ export class BlockSvg
683701 if ( adding ) {
684702 this . translation = '' ;
685703 common . draggingConnections . push ( ...this . getConnections_ ( true ) ) ;
686- dom . addClass ( this . svgGroup_ , 'blocklyDragging' ) ;
704+ this . addClass ( 'blocklyDragging' ) ;
687705 } else {
688706 common . draggingConnections . length = 0 ;
689- dom . removeClass ( this . svgGroup_ , 'blocklyDragging' ) ;
707+ this . removeClass ( 'blocklyDragging' ) ;
690708 }
691709 // Recurse through all blocks attached under this one.
692710 for ( let i = 0 ; i < this . childBlocks_ . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments