fix(视图): AntV 移动端折线图折点变大
This commit is contained in:
parent
4fc92598b6
commit
7ffccd3a53
@ -986,8 +986,8 @@ export default {
|
|||||||
this.scale = Math.min(this.previewCanvasScale.scalePointWidth, this.previewCanvasScale.scalePointHeight) * this.scaleCoefficient
|
this.scale = Math.min(this.previewCanvasScale.scalePointWidth, this.previewCanvasScale.scalePointHeight) * this.scaleCoefficient
|
||||||
const customAttrChart = JSON.parse(this.sourceCustomAttrStr)
|
const customAttrChart = JSON.parse(this.sourceCustomAttrStr)
|
||||||
const customStyleChart = JSON.parse(this.sourceCustomStyleStr)
|
const customStyleChart = JSON.parse(this.sourceCustomStyleStr)
|
||||||
recursionTransObj(customAttrTrans, customAttrChart, this.scale, this.scaleCoefficientType)
|
recursionTransObj(customAttrTrans, customAttrChart, this.scale, this.scaleCoefficientType, this.chart?.render)
|
||||||
recursionTransObj(customStyleTrans, customStyleChart, this.scale, this.scaleCoefficientType)
|
recursionTransObj(customStyleTrans, customStyleChart, this.scale, this.scaleCoefficientType, this.chart?.render)
|
||||||
// 移动端地图标签不显示
|
// 移动端地图标签不显示
|
||||||
if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') {
|
if (this.chart.type === 'map' && this.scaleCoefficientType === 'mobile') {
|
||||||
customAttrChart.label.show = false
|
customAttrChart.label.show = false
|
||||||
|
|||||||
@ -296,14 +296,14 @@ export function getScaleValue(propValue, scale) {
|
|||||||
return propValueTemp > 1 ? propValueTemp : 1
|
return propValueTemp > 1 ? propValueTemp : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
export function recursionTransObj(template, infoObj, scale, terminal) {
|
export function recursionTransObj(template, infoObj, scale, terminal, render) {
|
||||||
for (const templateKey in template) {
|
for (const templateKey in template) {
|
||||||
// 如果是数组 进行赋值计算
|
// 如果是数组 进行赋值计算
|
||||||
if (template[templateKey] instanceof Array) {
|
if (template[templateKey] instanceof Array) {
|
||||||
template[templateKey].forEach(templateProp => {
|
template[templateKey].forEach(templateProp => {
|
||||||
if (infoObj[templateKey] && infoObj[templateKey][templateProp]) {
|
if (infoObj[templateKey] && infoObj[templateKey][templateProp]) {
|
||||||
// 移动端特殊属性值设置
|
// 移动端特殊属性值设置
|
||||||
if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) {
|
if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined && render !== 'antv') {
|
||||||
infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp]
|
infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp]
|
||||||
} else {
|
} else {
|
||||||
infoObj[templateKey][templateProp] = getScaleValue(infoObj[templateKey][templateProp], scale)
|
infoObj[templateKey][templateProp] = getScaleValue(infoObj[templateKey][templateProp], scale)
|
||||||
@ -313,7 +313,7 @@ export function recursionTransObj(template, infoObj, scale, terminal) {
|
|||||||
} else {
|
} else {
|
||||||
// 如果是对象 继续进行递归
|
// 如果是对象 继续进行递归
|
||||||
if (infoObj[templateKey]) {
|
if (infoObj[templateKey]) {
|
||||||
recursionTransObj(template[templateKey], infoObj[templateKey], scale, terminal)
|
recursionTransObj(template[templateKey], infoObj[templateKey], scale, terminal, render)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user