@meta2d/chart-diagram
Advanced tools
Comparing version 1.0.11 to 1.0.12
{ | ||
"name": "@meta2d/chart-diagram", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "The charting library based on le5le meta2d and echarts/highcharts.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,2 +18,4 @@ import { BindId, Pen } from '@meta2d/core'; | ||
geoUrl?: string; | ||
diabled?: boolean; | ||
replaceMerge?: string; | ||
}; | ||
@@ -20,0 +22,0 @@ calculative?: { |
@@ -62,2 +62,3 @@ import { deepClone, deepSetValue, setElemPosition, getter, formatTime, setter, } from '@meta2d/core'; | ||
pen.onRenderPenRaw = onRenderPenRaw; | ||
pen.onScale = scale; | ||
} | ||
@@ -193,2 +194,9 @@ if (!pen.calculative.singleton) { | ||
function resize(pen) { | ||
move(pen); | ||
if (!pen.calculative.singleton?.echart) { | ||
return; | ||
} | ||
pen.calculative.singleton.echart.resize(); | ||
} | ||
function scale(pen) { | ||
if (!pen.calculative.singleton.echart) { | ||
@@ -207,3 +215,5 @@ return; | ||
return; | ||
pen.calculative.singleton.echart.setOption(updateOption(pen.echarts.option, pen.calculative.canvas.store.data.scale), true); | ||
if (!pen.echarts.diabled) { | ||
pen.calculative.singleton.echart.setOption(updateOption(pen.echarts.option, pen.calculative.canvas.store.data.scale), true); | ||
} | ||
// pen.beforeScale = pen.calculative.canvas.store.data.scale; | ||
@@ -221,3 +231,10 @@ pen.calculative.singleton.echart.resize(); | ||
const option = pen.calculative.partialOption.echarts.option; | ||
pen.calculative.singleton.echart.setOption(deepClone(option)); | ||
if (pen.echarts?.replaceMerge) { | ||
pen.calculative.singleton.echart.setOption(deepClone(option), { | ||
replaceMerge: pen.echarts.replaceMerge, | ||
}); | ||
} | ||
else { | ||
pen.calculative.singleton.echart.setOption(deepClone(option)); | ||
} | ||
} | ||
@@ -224,0 +241,0 @@ else { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97634
1320
3