(el, path, name, value)
| 5039 | } |
| 5040 | |
| 5041 | function setAttrByPath(el, path, name, value) { |
| 5042 | // Attr directly if not has property |
| 5043 | // FIXME, if some property not needed for element ? |
| 5044 | if (!path) { |
| 5045 | el.attr(name, value); |
| 5046 | } |
| 5047 | else { |
| 5048 | // Only support set shape or style |
| 5049 | var props = {}; |
| 5050 | props[path] = {}; |
| 5051 | props[path][name] = value; |
| 5052 | el.attr(props); |
| 5053 | } |
| 5054 | } |
| 5055 | |
| 5056 | /** |
| 5057 | * @alias module:zrender/Element |