优化代码 使用textBox
This commit is contained in:
parent
d16fc6febf
commit
13b169882b
@ -23279,8 +23279,8 @@ function ParseRegionTextPos(contour, holes, textBox = TEXT_BOX) {
|
||||
// p = midPoint(pts[index - 1], pts[index + 1]);
|
||||
// TestDraw(new Point(p));
|
||||
if (hasTextBox) {
|
||||
p.x += 280;
|
||||
p.y += 60;
|
||||
p.x += textBox.Size.x * 0.5;
|
||||
p.y += textBox.Size.y * 0.5;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
11
api.esm.js
11
api.esm.js
@ -22875,7 +22875,12 @@ function InitClipperCpp() {
|
||||
return new Promise((res, rej) => {
|
||||
clipperLib.loadNativeClipperLibInstanceAsync(
|
||||
// let it autodetect which one to use, but also available WasmOnly and AsmJsOnly
|
||||
clipperLib.NativeClipperLibRequestedFormat.WasmOnly).then(c => {
|
||||
//del_ue_exp_start
|
||||
clipperLib.NativeClipperLibRequestedFormat.WasmOnly
|
||||
//del_ue_exp_end
|
||||
//del_ue_exp_start
|
||||
//del_ue_exp_end clipperLib.NativeClipperLibRequestedFormat.AsmJsOnly
|
||||
).then(c => {
|
||||
clipperCpp.lib = c;
|
||||
res();
|
||||
// console.log("载入成功!");//不再需要
|
||||
@ -23247,8 +23252,8 @@ function ParseRegionTextPos(contour, holes, textBox = TEXT_BOX) {
|
||||
// p = midPoint(pts[index - 1], pts[index + 1]);
|
||||
// TestDraw(new Point(p));
|
||||
if (hasTextBox) {
|
||||
p.x += 280;
|
||||
p.y += 60;
|
||||
p.x += textBox.Size.x * 0.5;
|
||||
p.y += textBox.Size.y * 0.5;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user