Skip to content

Commit b95e932

Browse files
committed
up
1 parent 93e4b12 commit b95e932

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/command/SVGCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ export abstract class SVGCommand extends UndoableCommand {
88
}
99

1010
public getVisualSnapshot(): SVGElement {
11+
/**
12+
* Angular call this method multiple times to refresh the page.
13+
* So caching the snapshot
14+
*/
1115
if(this.cacheSnap === undefined) {
1216
this.cacheSnap = this.svgdoc.cloneNode(true) as SVGElement;
1317
}
14-
// console.log(this.cacheSnap);
1518
return this.cacheSnap;
1619
}
1720
}

0 commit comments

Comments
 (0)