Skip to content

Commit d41c360

Browse files
committed
style: 整体UI样式优化
1 parent 1b67d21 commit d41c360

File tree

28 files changed

+2285
-1157
lines changed

28 files changed

+2285
-1157
lines changed

examples/feature-examples/src/pages/graph/index.tsx

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,19 @@ export default function BasicNode() {
289289
;(window as any).lf = lf
290290
}
291291
}, [])
292-
292+
const handleRandomEdgeOffset = () => {
293+
if (lfRef.current) {
294+
const { edges } = lfRef.current.getGraphData() as GraphData
295+
forEach(edges, (edge) => {
296+
if (edge.type !== 'polyline') return
297+
const offset = Math.random() * 100
298+
console.log('handleRandomEdgeOffset offset', offset)
299+
lfRef.current?.setProperties(edge.id, {
300+
offset,
301+
})
302+
})
303+
}
304+
}
293305
const setArrow = (arrowName: string) => {
294306
const lf = lfRef.current
295307
if (lf) {
@@ -302,7 +314,19 @@ export default function BasicNode() {
302314
})
303315
}
304316
}
305-
317+
const handleRandomEdgeRadius = () => {
318+
if (lfRef.current) {
319+
const { edges } = lfRef.current.getGraphData() as GraphData
320+
forEach(edges, (edge) => {
321+
if (edge.type !== 'polyline') return
322+
const radius = Math.random() * 100
323+
console.log('handleRandomEdgeRadius radius', radius)
324+
lfRef.current?.setProperties(edge.id, {
325+
radius,
326+
})
327+
})
328+
}
329+
}
306330
const focusOn = () => {
307331
lfRef?.current?.focusOn({
308332
id: 'custom-node-1',
@@ -576,6 +600,20 @@ export default function BasicNode() {
576600
>
577601
开启边动画
578602
</Button>
603+
<Button
604+
key="randomEdgeOffset"
605+
type="primary"
606+
onClick={handleRandomEdgeOffset}
607+
>
608+
随机修改折线边offset
609+
</Button>
610+
<Button
611+
key="randomEdgeRadius"
612+
type="primary"
613+
onClick={handleRandomEdgeRadius}
614+
>
615+
随机修改折线边radius
616+
</Button>
579617
<Button
580618
key="closeEdgeAnimation"
581619
type="primary"

examples/feature-examples/src/pages/grid/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default function SelectionSelectExample() {
202202
</Form.Item>
203203
<Form.Item label="网格颜色">
204204
<ColorPicker
205-
value={'#ababab'}
205+
value={'#D7DEEB'}
206206
onChange={(color) => {
207207
lfRef.current?.graphModel.updateGridOptions({
208208
config: { color: color.toHexString() },

0 commit comments

Comments
 (0)