forked from github/dataease
fix(数据大屏): 修复控制台异常报错关闭sourcemap等问题
This commit is contained in:
parent
5dca1eaf23
commit
f6a367a7c7
@ -26,6 +26,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
sourcemap: true
|
||||
sourcemap: false
|
||||
}
|
||||
}
|
||||
|
@ -34,12 +34,12 @@ const showLine = (isDownward, isRightward) => {
|
||||
|
||||
hideLine()
|
||||
components.forEach(component => {
|
||||
try {
|
||||
if (component === curComponent.value) return
|
||||
const componentStyle = getComponentRotatedStyle(component.style)
|
||||
const { top, left, bottom, right } = componentStyle
|
||||
const componentHalfWidth = componentStyle.width / 2
|
||||
const componentHalfHeight = componentStyle.height / 2
|
||||
|
||||
const conditions = {
|
||||
top: [
|
||||
{
|
||||
@ -152,6 +152,9 @@ const showLine = (isDownward, isRightward) => {
|
||||
if (needToShow.length) {
|
||||
chooseTheTrueLine(needToShow, isDownward, isRightward)
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('markLine disabled')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -83,10 +83,10 @@ const onPositionChange = key => {
|
||||
positionMounted.value[key] = 0
|
||||
}
|
||||
const originRadio = curComponent.value.style.width / curComponent.value.style.height
|
||||
curComponent.value.style[key] = Math.round(
|
||||
if (curComponent.value.maintainRadio) {
|
||||
curComponent.value.style[key] = Math.ceil(
|
||||
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||
)
|
||||
if (curComponent.value.maintainRadio) {
|
||||
if (key === 'width') {
|
||||
curComponent.value.style['height'] = curComponent.value.style['width'] / originRadio
|
||||
positionMounted.value['height'] = Math.round(positionMounted.value['width'] / originRadio)
|
||||
@ -94,6 +94,10 @@ const onPositionChange = key => {
|
||||
curComponent.value.style['width'] = curComponent.value.style['height'] * originRadio
|
||||
positionMounted.value['width'] = Math.round(positionMounted.value['height'] * originRadio)
|
||||
}
|
||||
} else {
|
||||
curComponent.value.style[key] = Math.round(
|
||||
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||
)
|
||||
}
|
||||
|
||||
if (curComponent.value.component === 'Group') {
|
||||
|
Loading…
Reference in New Issue
Block a user