This commit is contained in:
锦恢 2025-01-02 01:54:46 +08:00
parent 859e9734f0
commit f148e9a24f
5 changed files with 9 additions and 11 deletions

View File

@ -15,7 +15,7 @@
<script>
window.readNetFile = async () => {
const inputVcdFile = 'IF_ID.json';
const inputVcdFile = 'full_adder.json';
const skin = 'dide.skin';
const r1 = await fetch(inputVcdFile);
const r2 = await fetch(skin);
@ -23,7 +23,7 @@
const skinBinary = await r2.arrayBuffer();
return [ netJson, skinBinary ];
}
window.moduleName = 'IF_ID';
window.moduleName = 'full_adder';
// window.avoidWasm = 'avoid.wasm';
</script>
</head>

View File

@ -43,8 +43,8 @@
--multiplexers-fill-color: #E59866;
--registers-color: #95A5A6;
--registers-fill-color: #D5DBDB;
--unary-color: #1ABC9C;
--unary-fill-color: #A3E4D7;
--unary-color: #279BB0;
--unary-fill-color: #a3cee4;
--line-arrow-opacity: 1;

Binary file not shown.

View File

@ -145,16 +145,16 @@ export function onGeneralColorChange(colorString) {
export function onCellColorChange(colorString) {
const { r, g, b } = parseColor(colorString);
const index = colorManager.currentGerneralIndex;
const item = colorManager.generals[index];
const index = colorManager.currentCellIndex;
const item = colorManager.cells[index];
const borderColor = `rgb(${r}, ${g}, ${b})`;
const { ir, ig, ib } = increaseBrightness({ r, g, b }, 10);
const fillColor = `rgb(${ir}, ${ig}, ${ib})`;
const rootStyles = getComputedStyle(document.documentElement);
document.documentElement.style.setProperty(`--${item.type}-color`, borderColor);
document.documentElement.style.setProperty(`--${item.type}-fill-color`, fillColor);
// document.documentElement.style.setProperty(`--${item.type}-fill-color`, fillColor);
}
export const predefinedColors = [

View File

@ -30,9 +30,7 @@ export class InstantiationRender {
* @description elknode 关于 例化模块 的数据添加为 d3 数据项目
* @param {import('../jsdoc').ElkNode} node
*/
addAsD3DataItem(node) {
console.log(node);
addAsD3DataItem(node) {
const nodeModule = this.rootRender.nameToModule.get(node.renderName);
const view = nodeModule.view;
const textPadding = 5;