Skip to content

Commit 792cd99

Browse files
hustcc逍为
andauthored
chore: opts guidance ui (#31)
Co-authored-by: 逍为 <[email protected]>
1 parent 81b757f commit 792cd99

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

client/packages/plugins/graph-analysis/src/client/components/guidance/assets/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export const Assets = {
99
download: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*QjWNRZ-LQ2kAAAAAAAAAAAAADgOBAQ/original',
1010
end: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*-a6uRYo-9qEAAAAAAAAAAAAADgOBAQ/fmt.webp',
1111
close: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*1qMxQ4fS3e0AAAAAAAAAAAAADgOBAQ/original',
12-
btnWelcome: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*T7bRTrLqVcUAAAAAAAAAAAAADgOBAQ/original',
12+
btnWelcome: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*-0IkQ4wm8TEAAAAAAAAAAAAADgOBAQ/original',
1313
btnNext: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*T7bRTrLqVcUAAAAAAAAAAAAADgOBAQ/original',
1414
btnEnd: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*8lvqQr_me34AAAAAAAAAAAAADgOBAQ/original',
15-
afterStyle: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*HGX-S4sElRQAAAAAAAAAAAAADgOBAQ/original',
16-
afterFilter: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*49UiTaFF8E4AAAAAAAAAAAAADgOBAQ/original',
15+
afterStyle: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*x3QnTr_EA2oAAAAAAAAAAAAADgOBAQ/original',
16+
afterFilter: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*iWG-S7i0c6EAAAAAAAAAAAAADgOBAQ/original',
1717
afterSpread: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*2XqOQ4y9pjsAAAAAAAAAAAAADgOBAQ/original',
1818
styleGif: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*v8SsRJ0mkFAAAAAAAAAAAAAADgOBAQ/original',
1919
spreadGif: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*P2nrTLAjhCkAAAAAAAAAAAAADgOBAQ/original',

client/packages/plugins/graph-analysis/src/client/components/guidance/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { FilterBtn, FilterPanel } from './filter';
88
import { Download } from './download';
99
import { End } from './end';
1010

11-
// @ts-ignore
1211
import styles from './index.module.less';
1312

1413
const LocalStorageKey = '__guidance_key__';
@@ -70,10 +69,11 @@ export const Guidance: React.FC = () => {
7069
if (step === 1) {
7170
// 查询
7271
getElement(SelectorQuery).click();
72+
} else if (step === 2) {
73+
getElement(SelectorPlaceholder).style.display = 'none';
7374
} else if (step === 3) {
7475
// 样式
7576
getElement(SelectorStyle).click();
76-
getElement(SelectorPlaceholder).style.display = 'none';
7777
} else if (step === 5) {
7878
// 筛选
7979
getElement(SelectorFilter).click();
@@ -138,7 +138,8 @@ export const Guidance: React.FC = () => {
138138
const fullscreen = document.body.getBoundingClientRect();
139139
if (step === 1 || step === 4 || step === 6) {
140140
const rect = getBoundings(SelectorSidebar);
141-
return getClipPathByTwoRect(rect, fullscreen);
141+
const newRect = new DOMRect(rect.x, rect.y, rect.width, rect.height - 64);
142+
return getClipPathByTwoRect(newRect, fullscreen);
142143
}
143144
if (step === 3) {
144145
const rect = getBoundings(SelectorStyle);

client/packages/plugins/graph-analysis/src/client/components/guidance/spread.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { StepUIProps } from './types';
33
import { Assets } from './assets';
4-
// @ts-ignore
54
import styles from './index.module.less';
65

76
/**
@@ -13,7 +12,7 @@ export const Spread: React.FC<StepUIProps> = ({ prev, next, end, x = 0, y = 0 })
1312
<div className={styles.spread} style={{ top: y, left: x }}>
1413
<div className={styles.container}>
1514
<img className={styles.background} style={{ width: 430 }} src={Assets.spread} />
16-
<img className={styles.gif} src={Assets.spreadGif} style={{ top: 78, left: 76, maxWidth: 256 }} />
15+
<img className={styles.gif} src={Assets.spreadGif} style={{ top: 82, left: 77, maxWidth: 246 }} />
1716
<div className={styles.btnContainer} style={{ top: 356, left: 245 }}>
1817
<div className={styles.nextBtn}>
1918
<img className={styles.btnBackground} src={Assets.btnNext} />
@@ -27,4 +26,3 @@ export const Spread: React.FC<StepUIProps> = ({ prev, next, end, x = 0, y = 0 })
2726
</div>
2827
);
2928
};
30-

client/packages/plugins/graph-analysis/src/client/components/guidance/style.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { StepUIProps } from './types';
33
import { Assets } from './assets';
4-
// @ts-ignore
54
import styles from './index.module.less';
65

76
/**
@@ -39,7 +38,7 @@ export const StylePanel: React.FC<StepUIProps> = ({ prev, next, end, x = 0, y =
3938
<div className={styles.container}>
4039
<img className={styles.background} style={{ width: 384 }} src={Assets.stylePanel} />
4140
<img className={styles.background} style={{ top: canvasY - y, left: canvasX - x }} src={Assets.afterStyle} />
42-
<img className={styles.gif} src={Assets.styleGif} style={{ top: 49, left: 43, maxWidth: 288 }} />
41+
<img className={styles.gif} src={Assets.styleGif} style={{ top: 55, left: 50, maxWidth: 273 }} />
4342
<div className={styles.btnContainer} style={{ top: 362, left: 248 }}>
4443
<div className={styles.nextBtn}>
4544
<img className={styles.btnBackground} src={Assets.btnNext} />

0 commit comments

Comments
 (0)