MCPcopy
hub / github.com/apache/echarts / copyElement

Function copyElement

src/chart/custom/CustomView.ts:192–206  ·  view source on GitHub ↗
(sourceEl: Element, targetEl: Element)

Source from the content-addressed store, hash-verified

190 return el instanceof Displayable;
191}
192function copyElement(sourceEl: Element, targetEl: Element) {
193 targetEl.copyTransform(sourceEl);
194 if (isDisplayable(targetEl) && isDisplayable(sourceEl)) {
195 targetEl.setStyle(sourceEl.style);
196 targetEl.z = sourceEl.z;
197 targetEl.z2 = sourceEl.z2;
198 targetEl.zlevel = sourceEl.zlevel;
199 targetEl.invisible = sourceEl.invisible;
200 targetEl.ignore = sourceEl.ignore;
201
202 if (isPath(targetEl) && isPath(sourceEl)) {
203 targetEl.setShape(sourceEl.shape);
204 }
205 }
206}
207export default class CustomChartView extends ChartView {
208
209 static type = 'custom';

Callers 1

doCreateOrUpdateElFunction · 0.85

Calls 4

isDisplayableFunction · 0.85
setStyleMethod · 0.80
setShapeMethod · 0.80
isPathFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…