feat(转换能力): 完善可编辑矢量转换与零线宽保存
build.yaml / build (push) Successful in 46s

This commit is contained in:
xiaoqidun committed 2026-09-24 19:12:58 +08:00
1 parent 444a84c629
commit b30a44b7ce
25 files changed
+529 -63

No files matched your search

+3 -2
View File
@@ -3445,12 +3445,13 @@ func setPathStyle(object *ofdgo.PathObject, args []js.Value) error {
}
if !args[4].IsNull() {
width := args[4].Float()
if width <= 0 || math.IsNaN(width) || math.IsInf(width, 0) {
return fmt.Errorf("line width must be positive and finite")
if width < 0 || math.IsNaN(width) || math.IsInf(width, 0) {
return fmt.Errorf("line width must be nonnegative and finite")
}
if scale := editorPathScale(*object); width != object.LineWidth*scale {
object.LineWidth = width / scale
}
object.LineWidthSet = width == 0
}
if !args[1].IsNull() {
if object.FillColor == nil {