@@ -56,7 +56,13 @@ class LayoutManagerWidget extends Widget {
5656 }
5757 processMessage ( msg : Message ) {
5858 super . processMessage ( msg ) ;
59- this . _view . processPhosphorMessage ( msg ) ;
59+ try {
60+ //@ts -ignore
61+ this . _view . processPhosphorMessage ( msg ) ;
62+ } catch {
63+ //@ts -ignore
64+ this . _view . processLuminoMessage ( msg ) ;
65+ }
6066 }
6167 get widgets ( ) : ReadonlyArray < Widget > {
6268 return ( this . layout as PanelLayout ) . widgets ;
@@ -111,6 +117,7 @@ export class ActiveHTMLModel extends DOMWidgetModel {
111117 _bodyType : "" ,
112118 _debugPrint :false ,
113119 styleDict : { } ,
120+ unsyncedProperties : [ ] ,
114121 elementAttributes : { } ,
115122 id : "" ,
116123 value : "" ,
@@ -351,6 +358,7 @@ export class ActiveHTMLView extends DOMWidgetView {
351358 setStyle ( style : WidgetModel , oldStyle ?: WidgetModel ) { } // null override
352359 setStyles ( ) : Promise < any > {
353360 let elementStyles = this . model . get ( "styleDict" ) as Record < string , string > ;
361+ let unsyncedProperties = this . model . get ( "unsyncedProperties" ) ;
354362 let keys = Object . keys ( elementStyles ) ;
355363 if ( keys . length === 0 ) {
356364 this . _currentStyles . clear ( ) ;
@@ -363,7 +371,7 @@ export class ActiveHTMLView extends DOMWidgetView {
363371 return ActiveHTMLView . _each (
364372 keys ,
365373 ( prop :string ) => {
366- if ( elementStyles . hasOwnProperty ( prop ) ) {
374+ if ( elementStyles . hasOwnProperty ( prop ) && ! unsyncedProperties . includes ( prop ) ) {
367375 // console.log(">>>", prop, elementStyles[prop], typeof prop);
368376 this . el . style . setProperty ( prop , elementStyles [ prop ] ) ;
369377 // console.log("<<<", prop, this.el.style.getPropertyValue(prop));
@@ -375,7 +383,7 @@ export class ActiveHTMLView extends DOMWidgetView {
375383 }
376384 updateStyles ( ) : Promise < any > {
377385 return this . setStyles ( ) . then (
378- ( ) => this . removeStyles
386+ ( ) => this . removeStyles ( )
379387 )
380388 }
381389
@@ -642,9 +650,12 @@ export class ActiveHTMLView extends DOMWidgetView {
642650 }
643651 updateAttributes ( ) :Promise < any > {
644652 let attrs = this . model . get ( 'elementAttributes' ) as Record < string , any > ;
653+ let unsyncedProperties = this . model . get ( 'unsyncedProperties' ) ;
645654 let debug = this . model . get ( "_debugPrint" ) ;
646655 if ( debug ) { console . log ( this . el , "Element Properties:" , attrs ) ; }
647- return ActiveHTMLView . _each ( Object . keys ( attrs ) , ( prop :string ) => this . _updateAttribute ( prop , attrs ) )
656+ return ActiveHTMLView . _each ( Object . keys ( attrs ) ,
657+ ( prop :string ) => ( ! unsyncedProperties . includes ( prop ) && this . _updateAttribute ( prop , attrs ) )
658+ )
648659 }
649660 notifyAttrUpdate ( prop :string ) :Promise < any > {
650661 let key = "view-change:" + prop ;
0 commit comments