Skip to content

Commit

Permalink
Fix bezier curve render problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Yin committed Jan 8, 2025
1 parent 47b94bb commit 2add561
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions src/extensions/renderer/base/coord-ele-math/edge-control-points.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,28 +706,7 @@ BRp.findEdgeControlPoints = function( edges ){
let cy = r.cy;
let hasCompounds = cy.hasCompoundNodes();

let hashTable = {
map: new Map(),
get: function(pairId){
let map2 = this.map.get(pairId[0]);

if( map2 != null ){
return map2.get(pairId[1]);
} else {
return null;
}
},
set: function(pairId, val){
let map2 = this.map.get(pairId[0]);

if( map2 == null ){
map2 = new Map();
this.map.set(pairId[0], map2);
}

map2.set(pairId[1], val);
}
};
let hashTable = new Map();

let pairIds = [];
let haystackEdges = [];
Expand Down Expand Up @@ -756,7 +735,7 @@ BRp.findEdgeControlPoints = function( edges ){
let srcIndex = src.poolIndex();
let tgtIndex = tgt.poolIndex();

let pairId = [ srcIndex, tgtIndex ].sort();
let pairId = `${srcIndex}_${tgtIndex}_${edgeIsUnbundled}`;

let tableEntry = hashTable.get( pairId );

Expand Down

0 comments on commit 2add561

Please sign in to comment.