diff --git a/src/components/Canvas/DepthCanvas/components/depth-header-tools.vue b/src/components/Canvas/DepthCanvas/components/depth-header-tools.vue
index d153721..637918d 100644
--- a/src/components/Canvas/DepthCanvas/components/depth-header-tools.vue
+++ b/src/components/Canvas/DepthCanvas/components/depth-header-tools.vue
@@ -36,9 +36,10 @@
step: { default: 0.1, type: Number }
})
const emit = defineEmits(['export', 'export-local', 'import-local', 'export-close'])
- const importLocalImage = inject('importLocalImage') as () => void
+ const importLocalImage = inject('importLocalImage') as (isRecord?: boolean) => void
const stateManager = inject('stateManager') as any
const toolManager = inject('toolManager') as any
+ const objectManager = inject('objectManager') as any
const tool = computed(() => toolManager.currentTool.value)
const historyIndex = computed(() => stateManager.historyIndex.value)
const historyList = computed(() => stateManager.historyList.value)
@@ -54,7 +55,7 @@
icon: 'dc-image',
iconSize: 17,
disabled: ref(false),
- on: () => importLocalImage()
+ on: () => onImageClick()
},
{ name: OperationType.SELECTBOX, icon: 'dc-selectbox', iconSize: 16, disabled: ref(false) },
{ name: OperationType.RECTANGLE, icon: 'dc-rectangle', iconSize: 16, disabled: ref(false) },
@@ -82,6 +83,10 @@
toolManager.setTool(tool.name)
}
}
+ const onImageClick = async () => {
+ const layer = await importLocalImage(false)
+ objectManager.setFillRepeat(layer?.info?.id)
+ }
diff --git a/src/components/Canvas/DepthCanvas/components/details-panel/index.vue b/src/components/Canvas/DepthCanvas/components/details-panel/index.vue
index 5e0320c..53036d1 100644
--- a/src/components/Canvas/DepthCanvas/components/details-panel/index.vue
+++ b/src/components/Canvas/DepthCanvas/components/details-panel/index.vue
@@ -7,14 +7,16 @@