File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
examples/feature-examples/src/pages/extensions/snapshot
packages/extension/src/tools/snapshot Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export default function SnapshotExample() {
149
149
if ( lfRef . current ) {
150
150
setBase64Data ( '' )
151
151
lfRef . current
152
- . getSnapshotBlob ( '#FFFFFF ' , fileType )
152
+ . getSnapshotBlob ( '#fff ' , fileType )
153
153
. then (
154
154
( {
155
155
data,
Original file line number Diff line number Diff line change @@ -47,9 +47,8 @@ export class Snapshot {
47
47
// 画布当前渲染模式和用户导出渲染模式不一致时,需要更新画布
48
48
if ( curPartial !== partial ) {
49
49
this . lf . graphModel . setPartial ( partial )
50
- this . lf . graphModel . eventCenter . on ( 'graph:updated' , async ( ) => {
50
+ this . lf . graphModel . eventCenter . once ( 'graph:updated' , async ( ) => {
51
51
await this . getSnapshot ( fileName , toImageOptions )
52
- this . lf . graphModel . eventCenter . off ( 'graph:updated' )
53
52
// 恢复原来渲染模式
54
53
this . lf . graphModel . setPartial ( curPartial )
55
54
} )
You can’t perform that action at this time.
0 commit comments