@@ -10,7 +10,7 @@ import {
1010 Transactor ,
1111 Update ,
1212} from '@omicronenergy/oscd-api' ;
13- import { newEditEvent } from '@omicronenergy/oscd-api/utils.js' ;
13+ import { newEditEvent , newEditEventV2 } from '@omicronenergy/oscd-api/utils.js' ;
1414import { getReference } from '@openscd/oscd-scl' ;
1515
1616import type { Dialog } from '@material/mwc-dialog' ;
@@ -986,11 +986,13 @@ export default class OscdEditorSLD extends LitElement {
986986 } }
987987 @oscd-sld-resize = ${ ( { detail : { element, w, h } } : ResizeEvent ) => {
988988 this . dispatchEvent (
989- newEditEvent ( {
989+ newEditEventV2 ( {
990990 element,
991- attributes : {
992- w : { namespaceURI : sldNs , value : w . toString ( ) } ,
993- h : { namespaceURI : sldNs , value : h . toString ( ) } ,
991+ attributesNS : {
992+ [ sldNs ] : {
993+ w : w . toString ( ) ,
994+ h : h . toString ( ) ,
995+ } ,
994996 } ,
995997 } ) ,
996998 ) ;
@@ -1010,15 +1012,17 @@ export default class OscdEditorSLD extends LitElement {
10101012 ly += y - oldY ;
10111013 }
10121014 this . dispatchEvent (
1013- newEditEvent ( {
1015+ newEditEventV2 ( {
10141016 element,
1015- attributes : {
1016- x : { namespaceURI : sldNs , value : x . toString ( ) } ,
1017- y : { namespaceURI : sldNs , value : y . toString ( ) } ,
1018- w : { namespaceURI : sldNs , value : w . toString ( ) } ,
1019- h : { namespaceURI : sldNs , value : h . toString ( ) } ,
1020- lx : { namespaceURI : sldNs , value : lx . toString ( ) } ,
1021- ly : { namespaceURI : sldNs , value : ly . toString ( ) } ,
1017+ attributesNS : {
1018+ [ sldNs ] : {
1019+ x : x . toString ( ) ,
1020+ y : y . toString ( ) ,
1021+ w : w . toString ( ) ,
1022+ h : h . toString ( ) ,
1023+ lx : lx . toString ( ) ,
1024+ ly : ly . toString ( ) ,
1025+ } ,
10221026 } ,
10231027 } ) ,
10241028 ) ;
@@ -1059,6 +1063,7 @@ export default class OscdEditorSLD extends LitElement {
10591063 node . setAttributeNS ( sldNs , `${ this . nsp } :w` , '50' ) ;
10601064 node . setAttributeNS ( sldNs , `${ this . nsp } :h` , '25' ) ;
10611065 this . dispatchEvent ( newEditEvent ( { parent, node, reference } ) ) ;
1066+ this . dispatchEvent ( newEditEventV2 ( { parent, node, reference } ) ) ;
10621067 }
10631068
10641069 static styles = css `
0 commit comments