@@ -29,7 +29,6 @@ import {Coordinate} from './utils/coordinate.js';
2929import * as dom from './utils/dom.js' ;
3030import * as parsing from './utils/parsing.js' ;
3131import * as utilsString from './utils/string.js' ;
32- import * as style from './utils/style.js' ;
3332import { Svg } from './utils/svg.js' ;
3433
3534/**
@@ -293,7 +292,7 @@ export class FieldDropdown extends Field<string> {
293292
294293 if ( this . getConstants ( ) ! . FIELD_DROPDOWN_COLOURED_DIV ) {
295294 const primaryColour = block . getColour ( ) ;
296- const borderColour = ( this . sourceBlock_ as BlockSvg ) . style . colourTertiary ;
295+ const borderColour = ( this . sourceBlock_ as BlockSvg ) . getColourTertiary ( ) ;
297296 dropDownDiv . setColour ( primaryColour , borderColour ) ;
298297 }
299298
@@ -306,11 +305,6 @@ export class FieldDropdown extends Field<string> {
306305
307306 if ( this . selectedMenuItem ) {
308307 this . menu_ ! . setHighlighted ( this . selectedMenuItem ) ;
309- style . scrollIntoContainerView (
310- this . selectedMenuItem . getElement ( ) ! ,
311- dropDownDiv . getContentDiv ( ) ,
312- true ,
313- ) ;
314308 }
315309
316310 this . applyColour ( ) ;
@@ -469,21 +463,21 @@ export class FieldDropdown extends Field<string> {
469463 * Updates the dropdown arrow to match the colour/style of the block.
470464 */
471465 override applyColour ( ) {
472- const style = ( this . sourceBlock_ as BlockSvg ) . style ;
466+ const sourceBlock = this . sourceBlock_ as BlockSvg ;
473467 if ( this . borderRect_ ) {
474- this . borderRect_ . setAttribute ( 'stroke' , style . colourTertiary ) ;
468+ this . borderRect_ . setAttribute ( 'stroke' , sourceBlock . getColourTertiary ( ) ) ;
475469 if ( this . menu_ ) {
476- this . borderRect_ . setAttribute ( 'fill' , style . colourTertiary ) ;
470+ this . borderRect_ . setAttribute ( 'fill' , sourceBlock . getColourTertiary ( ) ) ;
477471 } else {
478472 this . borderRect_ . setAttribute ( 'fill' , 'transparent' ) ;
479473 }
480474 }
481475 // Update arrow's colour.
482- if ( this . sourceBlock_ && this . arrow ) {
483- if ( this . sourceBlock_ . isShadow ( ) ) {
484- this . arrow . style . fill = style . colourSecondary ;
476+ if ( sourceBlock && this . arrow ) {
477+ if ( sourceBlock . isShadow ( ) ) {
478+ this . arrow . style . fill = sourceBlock . getColourSecondary ( ) ;
485479 } else {
486- this . arrow . style . fill = style . colourPrimary ;
480+ this . arrow . style . fill = sourceBlock . getColour ( ) ;
487481 }
488482 }
489483 }
0 commit comments