Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix line bounds with defined false, closed #1463 #1478

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-core",
"comment": "fix: fix line bounds with defined false, closed #1463",
"type": "none"
}
],
"packageName": "@visactor/vrender-core"
}
4 changes: 2 additions & 2 deletions packages/vrender-core/src/graphic/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class Line extends Graphic<ILineGraphicAttribute> implements ILine {
const { points = lineTheme.points, connectedType } = attribute;
const b = aabbBounds;
points.forEach(p => {
if (p.defined !== false || connectedType === 'zero') {
if (p.defined !== false || connectedType === 'zero' || connectedType === 'connect') {
b.add(p.x, p.y);
}
});
Expand All @@ -98,7 +98,7 @@ export class Line extends Graphic<ILineGraphicAttribute> implements ILine {
const b = aabbBounds;
segments.forEach(s => {
s.points.forEach(p => {
if (p.defined !== false || connectedType === 'zero') {
if (p.defined !== false || connectedType === 'zero' || connectedType === 'connect') {
b.add(p.x, p.y);
}
});
Expand Down
Loading