Skip to content

Commit

Permalink
Merge pull request #900 from VisActor/fix/html
Browse files Browse the repository at this point in the history
fix: fix issue with html attribute
  • Loading branch information
neuqzxy authored Jan 16, 2024
2 parents b2a90da + d111878 commit 676fed5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-core",
"comment": "fix: fix issue with html attribute",
"type": "none"
}
],
"packageName": "@visactor/vrender-core"
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ export class HtmlAttributePlugin implements IPlugin {
}
let left: number = 0;
let top: number = 0;
if (anchorType === 'position') {
const b = graphic.globalAABBBounds;
if (anchorType === 'position' || b.empty()) {
const matrix = graphic.globalTransMatrix;
left = matrix.e;
top = matrix.f;
} else {
const b = graphic.globalAABBBounds;
left = b.x1;
top = b.y1;
}
Expand Down

0 comments on commit 676fed5

Please sign in to comment.