允许返回空

master 0.0.54
ChenX 6 months ago
parent bdb033f410
commit bfa2feca5b

@ -23220,6 +23220,8 @@ function ParseRegionTextPos(contour, holes, textBox = TEXT_BOX, allowReturnNullP
let path = new Path(contour);
let nfps = path.GetInsideNFP(textBox)?.map(nfp => Path2Polyline(PathTranslate_Self(PathScale(nfp, 1e-4), path.OrigionMinPoint.x, path.OrigionMinPoint.y))); //可能无法获得
if (!nfps || nfps.length === 0) {
if (allowReturnNullPos)
return;
nfps = [Path2Polyline(contour)];
hasTextBox = false;
}

File diff suppressed because one or more lines are too long

@ -23193,6 +23193,8 @@ function ParseRegionTextPos(contour, holes, textBox = TEXT_BOX, allowReturnNullP
let path = new Path(contour);
let nfps = path.GetInsideNFP(textBox)?.map(nfp => Path2Polyline(PathTranslate_Self(PathScale(nfp, 1e-4), path.OrigionMinPoint.x, path.OrigionMinPoint.y))); //可能无法获得
if (!nfps || nfps.length === 0) {
if (allowReturnNullPos)
return;
nfps = [Path2Polyline(contour)];
hasTextBox = false;
}

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"version":3,"file":"ParseRegionTextPos.d.ts","sourceRoot":"","sources":["../../../../../src/DatabaseServices/Room/ParseService/ParseRegionTextPos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAInD,OAAO,EAAE,IAAI,EAAiC,MAAM,yBAAyB,CAAC;AAQ9E;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,OAAW,EAAE,kBAAkB,UAAQ,GAAG,OAAO,GAAG,SAAS,CA2G5I"}
{"version":3,"file":"ParseRegionTextPos.d.ts","sourceRoot":"","sources":["../../../../../src/DatabaseServices/Room/ParseService/ParseRegionTextPos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAInD,OAAO,EAAE,IAAI,EAAiC,MAAM,yBAAyB,CAAC;AAQ9E;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,OAAW,EAAE,kBAAkB,UAAQ,GAAG,OAAO,GAAG,SAAS,CA6G5I"}
Loading…
Cancel
Save