Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front
This commit is contained in:
@@ -101,12 +101,15 @@ export class AISelectboxToolManager {
|
|||||||
}
|
}
|
||||||
createIndicatorObject() {
|
createIndicatorObject() {
|
||||||
this.clearIndicatorObject()
|
this.clearIndicatorObject()
|
||||||
|
var color = 'rgba(0, 255, 0, 0.5)'
|
||||||
|
if (this.toolManager.currentTool.value === OperationType.AISELECT_REMOVE) {
|
||||||
|
color = 'rgba(255, 0, 0, 0.5)'
|
||||||
|
}
|
||||||
const rect = new fabric.Rect({
|
const rect = new fabric.Rect({
|
||||||
left: this.startX,
|
left: this.startX,
|
||||||
top: this.startY,
|
|
||||||
width: 0,
|
width: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
fill: 'transparent',
|
fill: color,
|
||||||
stroke: '#000',
|
stroke: '#000',
|
||||||
strokeWidth: 1,
|
strokeWidth: 1,
|
||||||
evented: false,
|
evented: false,
|
||||||
|
|||||||
@@ -101,8 +101,6 @@ export class CanvasManager {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.canvas = createCanvas(options.canvasRef.value, {
|
this.canvas = createCanvas(options.canvasRef.value, {
|
||||||
preserveObjectStacking: true,
|
|
||||||
enableRetinaScaling: true,
|
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
})
|
})
|
||||||
if (image) {
|
if (image) {
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ import { fabric } from "fabric-with-all";
|
|||||||
export const createCanvas = (elementId, options = {}) => {
|
export const createCanvas = (elementId, options = {}) => {
|
||||||
// Create the canvas instance
|
// Create the canvas instance
|
||||||
const canvas = new fabric.Canvas(elementId, {
|
const canvas = new fabric.Canvas(elementId, {
|
||||||
enableRetinaScaling: true,
|
controlsAboveOverlay: true,// 控制面板在图层之上
|
||||||
renderOnAddRemove: false,
|
enableRetinaScaling: true,// 启用Retina缩放
|
||||||
|
renderOnAddRemove: false,// 不在添加或移除对象时重新渲染
|
||||||
preserveObjectStacking: true, // 保持对象堆叠顺序
|
preserveObjectStacking: true, // 保持对象堆叠顺序
|
||||||
// skipOffscreen: true, // 跳过离屏渲染
|
// skipOffscreen: true, // 跳过离屏渲染
|
||||||
imageSmoothingEnabled: true, // 启用图像平滑 - 抗锯齿
|
imageSmoothingEnabled: true, // 启用图像平滑 - 抗锯齿
|
||||||
@@ -26,7 +27,7 @@ export const createCanvas = (elementId, options = {}) => {
|
|||||||
*/
|
*/
|
||||||
export const createStaticCanvas = (elementId, options = {}) => {
|
export const createStaticCanvas = (elementId, options = {}) => {
|
||||||
const canvas = new fabric.StaticCanvas(elementId, {
|
const canvas = new fabric.StaticCanvas(elementId, {
|
||||||
enableRetinaScaling: true,
|
enableRetinaScaling: true,// 启用Retina缩放
|
||||||
imageSmoothingEnabled: true, // 启用图像平滑 - 抗锯齿
|
imageSmoothingEnabled: true, // 启用图像平滑 - 抗锯齿
|
||||||
imageSmoothingQuality: "high", // 设置高质量图像平滑
|
imageSmoothingQuality: "high", // 设置高质量图像平滑
|
||||||
skipOffscreen: false, // 不跳过离屏渲染
|
skipOffscreen: false, // 不跳过离屏渲染
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
v-for="(item, i) in data.imageProcessTasks"
|
v-for="(item, i) in data.imageProcessTasks"
|
||||||
:key="item.taskId"
|
:key="item.taskId"
|
||||||
:class="{'active': node.id == stateManager.activeNodeID.value && item.taskId == data.selectTaskId}"
|
:class="{'active': node.id == stateManager.activeNodeID.value && item.taskId == data.selectTaskId}"
|
||||||
@click="setSelectTaskId(item.taskId)"
|
@mousedown="setSelectTaskId(item.taskId)"
|
||||||
>
|
>
|
||||||
<div class="header" v-if="item.status == 'RETURNED'" v-show="showHeader && node.id == stateManager.activeNodeID.value && item.taskId == data.selectTaskId" @mousedown.stop>
|
<div class="header" v-if="item.status == 'RETURNED'" v-show="showHeader && node.id == stateManager.activeNodeID.value && item.taskId == data.selectTaskId" @mousedown.stop>
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
</HighlightAdmin>
|
</HighlightAdmin>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" v-if="item.status == 'RETURNED'" @click="clickimageProcessTaskItem(item.taskId)" @mousedown.stop>
|
<div class="more" v-if="item.status == 'RETURNED'" @mousedown="clickimageProcessTaskItem(item.taskId)">
|
||||||
<svg-icon name="more" size="24" size-unit="px" color="#C9C9C9" />
|
<svg-icon name="more" size="24" size-unit="px" color="#C9C9C9" />
|
||||||
</div>
|
</div>
|
||||||
<div class="menu" v-show="showMenu && item.taskId === clickTaskId" @mousedown.stop>
|
<div class="menu" v-show="showMenu && item.taskId === data.selectTaskId && node.id == stateManager.activeNodeID.value" @mousedown.stop>
|
||||||
<div
|
<div
|
||||||
v-for="(v, i) in menus"
|
v-for="(v, i) in menus"
|
||||||
:key="i"
|
:key="i"
|
||||||
@@ -92,15 +92,16 @@
|
|||||||
const showHeader = ref(true)
|
const showHeader = ref(true)
|
||||||
// const showHeader = ref(!!props.node?.data?.isHeader)
|
// const showHeader = ref(!!props.node?.data?.isHeader)
|
||||||
const showMenu = ref(false)
|
const showMenu = ref(false)
|
||||||
const clickTaskId = ref('')
|
|
||||||
const generateManager = inject('generateManager') as any
|
const generateManager = inject('generateManager') as any
|
||||||
const stateManager = inject('stateManager') as any
|
const stateManager = inject('stateManager') as any
|
||||||
const eventManager = inject('eventManager') as any
|
const eventManager = inject('eventManager') as any
|
||||||
const clickimageProcessTaskItem = (taskId: string) => {
|
const clickimageProcessTaskItem = (taskId: string) => {
|
||||||
if(clickTaskId.value == taskId){
|
if(data.selectTaskId == taskId){
|
||||||
showMenu.value = !showMenu.value
|
showMenu.value = !showMenu.value
|
||||||
|
}else{
|
||||||
|
showMenu.value = true
|
||||||
}
|
}
|
||||||
clickTaskId.value = taskId
|
data.selectTaskId = taskId
|
||||||
}
|
}
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
selectTaskId: props.data?.selectTaskId || '',
|
selectTaskId: props.data?.selectTaskId || '',
|
||||||
@@ -203,7 +204,6 @@
|
|||||||
}
|
}
|
||||||
const hideMenu = () => {
|
const hideMenu = () => {
|
||||||
showMenu.value = false
|
showMenu.value = false
|
||||||
clickTaskId.value = ''
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const depthCanvasClose = ()=>{
|
const depthCanvasClose = ()=>{
|
||||||
@@ -377,7 +377,8 @@
|
|||||||
}
|
}
|
||||||
> .status{
|
> .status{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 140px;
|
// height: 140px;
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user