Merge pull request #11051 from dataease/pr@dev@fix_antv_line_dot

Pr@dev@fix antv line dot
This commit is contained in:
wisonic-s 2024-07-19 17:52:36 +08:00 committed by GitHub
commit f8934c6dbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -985,8 +985,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

View File

@ -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)
} }
} }
} }