Skip to content

Commit 6cbb775

Browse files
clean
1 parent 8382260 commit 6cbb775

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

  • packages/designto-token/token-graphics

packages/designto-token/token-graphics/vector.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import { keyFromNode } from "../key";
66
import { tokenizeBackground } from "../token-background";
77
import { tokenizeBitmap } from "./bitmap";
88

9+
/**
10+
* @deprecated TODO: update the asset repository pattern.
11+
*/
12+
const _asset_key = "fill-later-assets";
13+
914
function fromStar(): VectorWidget {
1015
// return new VectorWidget("");
1116
return;
@@ -44,12 +49,10 @@ function fromFrame() {
4449
}
4550

4651
function fromImage(image: ReflectSceneNode, data: ImagePaint) {
47-
const _tmp_img = MainImageRepository.instance
48-
.get("fill-later-assets")
49-
.addImage({
50-
key: image.id,
51-
hash: data.imageHash,
52-
});
52+
const _tmp_img = MainImageRepository.instance.get(_asset_key).addImage({
53+
key: image.id,
54+
hash: data.imageHash,
55+
});
5356

5457
const _key = keyFromNode(image);
5558
return new ImageWidget({

0 commit comments

Comments
 (0)