This commit is contained in:
锦恢 2025-01-02 19:51:45 +08:00
parent 0b8e986990
commit 3a7e0987bd
15 changed files with 47 additions and 20 deletions

View File

@ -18,7 +18,7 @@ export const controlPanel = reactive({
this.currentIndex = -1; this.currentIndex = -1;
} else { } else {
if (horizontalResizer.width < 5) { if (horizontalResizer.width < 5) {
horizontalResizer.width = 362; horizontalResizer.width = 410;
} }
this.currentIndex = index; this.currentIndex = index;
} }
@ -29,7 +29,7 @@ export const controlPanel = reactive({
export const horizontalResizer = reactive({ export const horizontalResizer = reactive({
active: false, active: false,
hover: false, hover: false,
width: 362, width: 400,
mousedown() { mousedown() {
this.active = true; this.active = true;
document.addEventListener('mousemove', resize); document.addEventListener('mousemove', resize);

View File

@ -131,6 +131,7 @@
v-model="colorManager.generals[colorManager.currentGerneralIndex].color" v-model="colorManager.generals[colorManager.currentGerneralIndex].color"
@change="onGeneralColorChange" @change="onGeneralColorChange"
:predefine="predefinedColors" :predefine="predefinedColors"
:teleported="false"
/> />
</div> </div>
</div> </div>
@ -157,10 +158,19 @@
v-model="colorManager.cells[colorManager.currentCellIndex].color" v-model="colorManager.cells[colorManager.currentCellIndex].color"
@change="onCellColorChange" @change="onCellColorChange"
:predefine="predefinedColors" :predefine="predefinedColors"
:teleported="false"
/> />
</div> </div>
</div> </div>
<br>
<div class="setting-option" style="width: 380px;">
<span class="option-title" style="width: 200px;">
{{ t('setting.pulsation-speed') }}
</span>
<el-slider v-model="globalSetting.pulsationSpeed" show-stops :min="1" :max="11" :step="2"/>
</div>
<br>
</div> </div>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -256,7 +266,7 @@ onMounted(() => {
margin: 3px; margin: 3px;
padding: 8px 12px; padding: 8px 12px;
height: 40px; height: 40px;
width: 280px !important; width: 320px !important;
border-radius: .5em; border-radius: .5em;
background-color: var(--background); background-color: var(--background);
display: flex; display: flex;

View File

@ -33,9 +33,15 @@ export const globalSetting = reactive({
/** /**
* @description 当前交叉点的样式 * @description 当前交叉点的样式
* @type {'connect' | 'slice' | 'concat'} currentStyle * @type {'connect' | 'slice' | 'concat'}
*/ */
crossDotStyle: 'connect' crossDotStyle: 'connect',
/**
* @description 脉动动效的速度
* @type {number}
*/
pulsationSpeed: 5
}); });
export const globalLookup = reactive({ export const globalLookup = reactive({

View File

@ -5,7 +5,7 @@ import { globalSetting } from '../global';
import { NetlistRender } from '.'; import { NetlistRender } from '.';
import { getMarginParamter, LAYOUT_CONSTANT, LINE_WIDTH } from './layout'; import { getMarginParamter, LAYOUT_CONSTANT, LINE_WIDTH } from './layout';
import { svgResource } from '../skin/draw'; import { svgResource } from '../skin/draw';
import { PulseLine } from '../skin/plusation'; import { PulseLine } from '../skin/pulsation';
export class WireRender { export class WireRender {
/** /**

View File

@ -1,4 +1,5 @@
import * as d3 from 'd3'; import * as d3 from 'd3';
import { globalSetting } from '../global';
let PluseIDCount = 0; let PluseIDCount = 0;
@ -15,10 +16,10 @@ export class PulseLine {
loadToSelection(parentSelection, data) { loadToSelection(parentSelection, data) {
this.pluseId = data.id; this.pluseId = data.id;
const gId = 'pluse-g' + data.id; const gId = 'pulse-g' + data.id;
const pId = 'pluse-p' + data.id; const pId = 'pulse-p' + data.id;
const mId = 'pluse-m' + data.id; const mId = 'pulse-m' + data.id;
const uId = 'pluse-u' + data.id; const uId = 'pulse-u' + data.id;
const g = parentSelection.append("g") const g = parentSelection.append("g")
.attr("mask", `url(#${mId})`); .attr("mask", `url(#${mId})`);
@ -94,7 +95,7 @@ export class PulseLine {
const pathLength = pathElement.getTotalLength(); const pathLength = pathElement.getTotalLength();
// 600 配合 3000 比较合适 // 600 配合 3000 比较合适
const v = 0.5; const v = globalSetting.pulsationSpeed / 10;
const duration = pathLength / v; const duration = pathLength / v;
const keyframes = new KeyframeEffect( const keyframes = new KeyframeEffect(

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "إعداد لون المكون", "setting.cell-color-setting": "إعداد لون المكون",
"cross-dot-style.slice": "فاصل", "cross-dot-style.slice": "فاصل",
"cross-dot-style.connect": "محول مباشر", "cross-dot-style.connect": "محول مباشر",
"cross-dot-style.concat": "رمز الدمج" "cross-dot-style.concat": "رمز الدمج",
"setting.pulsation-speed": "سرعة تأثير النبض"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "Gerätefarbe einstellen", "setting.cell-color-setting": "Gerätefarbe einstellen",
"cross-dot-style.slice": "Trennzeichen", "cross-dot-style.slice": "Trennzeichen",
"cross-dot-style.connect": "Direktverbinder", "cross-dot-style.connect": "Direktverbinder",
"cross-dot-style.concat": "Zusammenführungszeichen" "cross-dot-style.concat": "Zusammenführungszeichen",
"setting.pulsation-speed": "Pulseffektgeschwindigkeit"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "Device color setting", "setting.cell-color-setting": "Device color setting",
"cross-dot-style.slice": "Separator", "cross-dot-style.slice": "Separator",
"cross-dot-style.connect": "Direct connector", "cross-dot-style.connect": "Direct connector",
"cross-dot-style.concat": "Combining Character" "cross-dot-style.concat": "Combining Character",
"setting.pulsation-speed": "Pulse Effect Speed"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "Réglage de la couleur de l'appareil", "setting.cell-color-setting": "Réglage de la couleur de l'appareil",
"cross-dot-style.slice": "Séparateur", "cross-dot-style.slice": "Séparateur",
"cross-dot-style.connect": "Connecteur direct", "cross-dot-style.connect": "Connecteur direct",
"cross-dot-style.concat": "Caractère de combinaison" "cross-dot-style.concat": "Caractère de combinaison",
"setting.pulsation-speed": "Vitesse de l'effet de pulsation"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "デバイスの色設定", "setting.cell-color-setting": "デバイスの色設定",
"cross-dot-style.slice": "区切り文字", "cross-dot-style.slice": "区切り文字",
"cross-dot-style.connect": "ダイレクトコネクタ", "cross-dot-style.connect": "ダイレクトコネクタ",
"cross-dot-style.concat": "結合文字" "cross-dot-style.concat": "結合文字",
"setting.pulsation-speed": "パルスエフェクト速度"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "장치 색상 설정", "setting.cell-color-setting": "장치 색상 설정",
"cross-dot-style.slice": "구분자", "cross-dot-style.slice": "구분자",
"cross-dot-style.connect": "직접 연결기", "cross-dot-style.connect": "직접 연결기",
"cross-dot-style.concat": "결합 문자" "cross-dot-style.concat": "결합 문자",
"setting.pulsation-speed": "펄스 효과 속도"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "Настройка цвета устройства", "setting.cell-color-setting": "Настройка цвета устройства",
"cross-dot-style.slice": "Разделитель", "cross-dot-style.slice": "Разделитель",
"cross-dot-style.connect": "Прямой соединитель", "cross-dot-style.connect": "Прямой соединитель",
"cross-dot-style.concat": "Комбинирующий символ" "cross-dot-style.concat": "Комбинирующий символ",
"setting.pulsation-speed": "Скорость импульсного эффекта"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "器件颜色设置", "setting.cell-color-setting": "器件颜色设置",
"cross-dot-style.slice": "拆分符", "cross-dot-style.slice": "拆分符",
"cross-dot-style.connect": "直连符", "cross-dot-style.connect": "直连符",
"cross-dot-style.concat": "合并符" "cross-dot-style.concat": "合并符",
"setting.pulsation-speed": "脉冲特效速度"
} }

View File

@ -40,5 +40,6 @@
"setting.cell-color-setting": "器件顏色設置", "setting.cell-color-setting": "器件顏色設置",
"cross-dot-style.slice": "分隔符", "cross-dot-style.slice": "分隔符",
"cross-dot-style.connect": "直連符", "cross-dot-style.connect": "直連符",
"cross-dot-style.concat": "合併符" "cross-dot-style.concat": "合併符",
"setting.pulsation-speed": "脈衝特效速度"
} }

View File

@ -17,6 +17,7 @@ module.exports = defineConfig({
}, },
devServer: { devServer: {
hot: false, hot: false,
host: 'localhost',
liveReload: false liveReload: false
} }
}) })