MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / fromObj

Method fromObj

src/common/iServer/ThemeGraph.js:320–334  ·  view source on GitHub ↗

* @function ThemeGraph.fromObj * @description 从传入对象获取统计专题图类。 * @param {Object} obj - 传入对象。 * @returns {ThemeGraph} ThemeGraph 对象。

(obj)

Source from the content-addressed store, hash-verified

318 * @returns {ThemeGraph} ThemeGraph 对象。
319 */
320 static fromObj(obj) {
321 var res = new ThemeGraph();
322 var itemsG = obj.items;
323 var len = itemsG ? itemsG.length : 0;
324 Util.copy(res, obj);
325 res.items = [];
326 res.graphAxes = ThemeGraphAxes.fromObj(obj);
327 res.graphSize = ThemeGraphSize.fromObj(obj);
328 res.graphText = ThemeGraphText.fromObj(obj);
329 res.offset = ThemeOffset.fromObj(obj);
330 for (var i = 0; i < len; i++) {
331 res.items.push(ThemeGraphItem.fromObj(itemsG[i]));
332 }
333 return res;
334 }
335
336}

Callers

nothing calls this directly

Calls 2

pushMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected