mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-30 22:14:13 +00:00
Merge pull request #1034 from GNS3/Custom-symbols-are-centered-in-GUI-but-skewed-on-Web-UI
Update node.ts
This commit is contained in:
commit
6af1b97174
@ -103,8 +103,12 @@ export class NodeWidget implements Widget {
|
|||||||
if (n.height > 64) return 64;
|
if (n.height > 64) return 64;
|
||||||
return n.height;
|
return n.height;
|
||||||
})
|
})
|
||||||
.attr('x', (n: MapNode) => 0)
|
.attr('x', (n: MapNode) => {
|
||||||
.attr('y', (n: MapNode) => 0)
|
return 0
|
||||||
|
})
|
||||||
|
.attr('y', (n: MapNode) => {
|
||||||
|
return 0
|
||||||
|
})
|
||||||
.on('mouseover', function(this, n: MapNode) {
|
.on('mouseover', function(this, n: MapNode) {
|
||||||
select(this).attr('class', 'over');
|
select(this).attr('class', 'over');
|
||||||
})
|
})
|
||||||
@ -113,6 +117,7 @@ export class NodeWidget implements Widget {
|
|||||||
});
|
});
|
||||||
|
|
||||||
node_body_merge.attr('transform', (n: MapNode) => {
|
node_body_merge.attr('transform', (n: MapNode) => {
|
||||||
|
if (!n.width) return `translate(${n.x - 30},${n.y - 30})`
|
||||||
return `translate(${n.x},${n.y})`;
|
return `translate(${n.x},${n.y})`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user