(opt: any, propName: string)
| 120 | } |
| 121 | |
| 122 | function compatTextStyle(opt: any, propName: string) { |
| 123 | // Check whether is not object (string\null\undefined ...) |
| 124 | const labelOptSingle = isObject(opt) && opt[propName]; |
| 125 | const textStyle = isObject(labelOptSingle) && labelOptSingle.textStyle; |
| 126 | if (textStyle) { |
| 127 | if (__DEV__) { |
| 128 | // eslint-disable-next-line max-len |
| 129 | deprecateLog(`textStyle hierarchy in ${propName} has been removed since 4.0. All textStyle properties are configured in ${propName} directly now.`); |
| 130 | } |
| 131 | for (let i = 0, len = modelUtil.TEXT_STYLE_OPTIONS.length; i < len; i++) { |
| 132 | const textPropName = modelUtil.TEXT_STYLE_OPTIONS[i]; |
| 133 | if (textStyle.hasOwnProperty(textPropName)) { |
| 134 | labelOptSingle[textPropName] = textStyle[textPropName]; |
| 135 | } |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | function compatEC3CommonStyles(opt: Dictionary<any>) { |
| 141 | if (opt) { |
no test coverage detected
searching dependent graphs…