library generate增加删除和拖拽移动位置功能 图片放大添加键盘事件调整按钮大小
This commit is contained in:
@@ -299,7 +299,7 @@ export default defineComponent({
|
||||
w = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)
|
||||
h = (e.x - this.frontBack.front[this.imgDomIndex].centers.left)*num
|
||||
width = w+'px'
|
||||
height = w*num+'px'
|
||||
// height = w*num+'px'
|
||||
}else if(this.direction == 'top'){
|
||||
num = width/height
|
||||
this.frontBack.front[this.imgDomIndex].style.top = 'auto'
|
||||
@@ -309,19 +309,19 @@ export default defineComponent({
|
||||
h = (this.frontBack.front[this.imgDomIndex].centers.top - e.y)
|
||||
|
||||
height = h+'px'
|
||||
width = h*num+'px'
|
||||
// width = h*num+'px'
|
||||
}else if(this.direction == 'bottom'){
|
||||
num = width/height
|
||||
h = (e.y - this.frontBack.front[this.imgDomIndex].centers.top)
|
||||
height = h+'px'
|
||||
width = h*num+'px'
|
||||
// width = h*num+'px'
|
||||
}else if(this.direction == 'left'){
|
||||
this.frontBack.front[this.imgDomIndex].style.left = 'auto'
|
||||
this.frontBack.front[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
|
||||
w = (this.frontBack.front[this.imgDomIndex].centers.left - e.x)
|
||||
|
||||
width = w+'px'
|
||||
height = w*num+'px'
|
||||
// height = w*num+'px'
|
||||
}
|
||||
//判断尺寸是否到边
|
||||
this.frontBack.front[this.imgDomIndex].style.width = width
|
||||
|
||||
Reference in New Issue
Block a user