@@ -84,7 +84,7 @@ function updateInputGraph(inputGraph, layoutGraph) {
84
84
let layoutLabel = layoutGraph . edge ( e ) ;
85
85
86
86
inputLabel . points = layoutLabel . points ;
87
- if ( layoutLabel . hasOwnProperty ( "x" ) ) {
87
+ if ( Object . hasOwn ( layoutLabel , "x" ) ) {
88
88
inputLabel . x = layoutLabel . x ;
89
89
inputLabel . y = layoutLabel . y ;
90
90
}
@@ -233,7 +233,7 @@ function translateGraph(g) {
233
233
g . nodes ( ) . forEach ( v => getExtremes ( g . node ( v ) ) ) ;
234
234
g . edges ( ) . forEach ( e => {
235
235
let edge = g . edge ( e ) ;
236
- if ( edge . hasOwnProperty ( "x" ) ) {
236
+ if ( Object . hasOwn ( edge , "x" ) ) {
237
237
getExtremes ( edge ) ;
238
238
}
239
239
} ) ;
@@ -253,8 +253,8 @@ function translateGraph(g) {
253
253
p . x -= minX ;
254
254
p . y -= minY ;
255
255
} ) ;
256
- if ( edge . hasOwnProperty ( "x" ) ) { edge . x -= minX ; }
257
- if ( edge . hasOwnProperty ( "y" ) ) { edge . y -= minY ; }
256
+ if ( Object . hasOwn ( edge , "x" ) ) { edge . x -= minX ; }
257
+ if ( Object . hasOwn ( edge , "y" ) ) { edge . y -= minY ; }
258
258
} ) ;
259
259
260
260
graphLabel . width = maxX - minX + marginX ;
@@ -283,7 +283,7 @@ function assignNodeIntersects(g) {
283
283
function fixupEdgeLabelCoords ( g ) {
284
284
g . edges ( ) . forEach ( e => {
285
285
let edge = g . edge ( e ) ;
286
- if ( edge . hasOwnProperty ( "x" ) ) {
286
+ if ( Object . hasOwn ( edge , "x" ) ) {
287
287
if ( edge . labelpos === "l" || edge . labelpos === "r" ) {
288
288
edge . width -= edge . labeloffset ;
289
289
}
0 commit comments