Skip to content

Commit 6a48dbf

Browse files
committed
chore: 预发布新版本、更新依赖
1 parent e2db8fa commit 6a48dbf

5 files changed

Lines changed: 349 additions & 664 deletions

File tree

extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"uuid": "9cc258d2dded489c852ced6a70113396",
44
"displayName": "Hilbert Creator",
55
"description": "Hilbert Creator",
6-
"version": "1.2.0",
6+
"version": "1.2.2",
77
"engines": {
88
"publisher": "Mr_Fang <klxf@vip.qq.com>",
99
"eda": "^2.2.35"

iframe/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,12 @@
9292
});
9393

9494
document.getElementById('clear').addEventListener('click', function () {
95-
// 似乎是 bug,无法删除绘制的线
95+
// 似乎是 bug,无法删除绘制的线,等待修复
9696
eda.sys_Message.showToastMessage('清空功能暂未实现,请手动删除', 'error');
9797
document.getElementById('clear').classList.add('hidden');
98+
/* eda.pcb_PrimitiveLine.getAllPrimitiveId("HILBERT").then((ids) => {
99+
eda.pcb_PrimitiveLine.delete(ids);
100+
}); */
98101
});
99102
</script>
100103
</body>

iframe/js/main.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ async function drawHilbertCurve(lineWidth, startX, startY, iterations, height, m
1515
let x = offset['offsetX'] + eda.sys_Unit.mmToMil(startX);
1616
let y = offset['offsetY'] + eda.sys_Unit.mmToMil(startY);
1717

18-
// 临时解决方案,2.2.35.4 已修复,正式发布后恢复
19-
lineWidth = eda.sys_Unit.mmToMil(lineWidth) / 10;
18+
// 临时解决方案,2.2.35.4 已修复
19+
// lineWidth = eda.sys_Unit.mmToMil(lineWidth) / 10;
2020
mode = parseInt(mode, 10);
2121

2222
/* if (mode >= 2) {
@@ -118,13 +118,9 @@ async function calcResistance(lineWidth) {
118118

119119
try {
120120
const length = await eda.pcb_Net.getNetLength('HILBERT');
121-
const R = (r * eda.sys_Unit.milToMm(length)) / (1000 * W * D);
122-
console.log('Resistance: ', R);
123-
return R;
121+
return (r * eda.sys_Unit.milToMm(length)) / (1000 * W * D);
124122
} catch (error) {
125123
console.error('Error calculating resistance: ', error);
126124
throw error;
127125
}
128126
}
129-
// 调用示例
130-
// drawHilbertCurve(0.254, 10, 10, 5, 50, 0);

0 commit comments

Comments
 (0)