Skip to content

fix(geometry): align bounds and area rendering for undefined points - #2133

Merged
xile611 merged 2 commits into
developfrom
codex/invalid-point-bounds-develop
Sep 17, 2026
Merged

xile611 merged 2 commits into
developfrom
codex/invalid-point-bounds-develop

Conversation

@xile611

@xile611 xile611 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

🤔 这个分支是...

  • Bug fix
  • 测试 case 更新

🔗 相关 issue 连接

关联 #2117。基于最新获取的 develop (3c80bbdf1) 依次移植:

  • b568bb44ce006f821decf514d1187fd18bb21111 → 770a9fca5
  • 45fd2eb01ee38c9c20c2d4b4522ad96505d8411b → 15417547d

🐞 Bugserver 用例 id

待补充。已提供真实 Canvas 的填充、拾取和局部重绘回归测试;远端视觉检查尚待运行。

💡 问题的背景&解决方案

defined: false 点不应扩大 line/area 的 bounds。收紧 bounds 后,area 的 basis 插值和首段无效单点仍可能使用无效坐标生成可见填充,造成路径与 bounds 不一致、漏拾取或脏区错误。

本次在 area 插值前按 none/connect 选择有效连续区间,上下边界使用相同的有效点,并保留原始 segment 样式归属。同步修复连接模式切换的缓存失效及增量 area 的同类问题。保留全有效 linear 快速路径;不修改共享裁剪算法,不引入 WeakMap 连续性状态。

移植适配仅保留 develop 已移除 DI 装饰器的实现,并让测试显式启用现有真实 Canvas 适配、复用当前 createBrowserStage 初始化与释放流程。

📝 Changelog

Language Changelog
🇺🇸 English Exclude undefined points from line/area bounds and prevent those coordinates from affecting area interpolation and incremental rendering.
🇨🇳 Chinese line/area 包围盒忽略无效点,修复无效坐标影响 area 插值与增量绘制的问题。

无公开 API 破坏性变更。验证范围包括缺失点、上下边界、分段样式、模式切换、裁剪、增量批次、Stage 拾取、局部重绘和 rough 缓存兼容。既有的全有效曲线过冲、零投影裁剪和增量 offset 问题不在本次范围内。

☑️ 自测

  • 文档提供了,或者更新,或者不需要
  • Demo 提供了,或者更新,或者不需要(Bugserver case 待补充)
  • Ts 类型定义提供了,或者更新,或者不需要
  • Changelog 提供了,或者不需要

验证结果:

  • core 定向回归:3 suites / 50 tests 通过。
  • Stage 集成回归:1 suite / 4 tests 通过。
  • rush compile -t @visactor/vrender 通过。
  • lint-staged、Prettier、commitlint 通过。
  • 推送钩子 rush test --only tag:package:7 个包通过,231 suites / 1,217 tests 通过,2 suites / 10 tests 跳过;有工具链警告,无测试失败。

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

kkxxkk2019 and others added 2 commits September 16, 2026 17:37
@xile611
xile611 merged commit 8f79cc1 into develop Sep 17, 2026
7 of 8 checks passed
@xile611
xile611 deleted the codex/invalid-point-bounds-develop branch September 17, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants