| 5 | |
| 6 | |
| 7 | export class ImageData extends RectData implements IImageData { |
| 8 | |
| 9 | declare public __leaf: IImage |
| 10 | |
| 11 | public get __urlType(): IMultimediaType { return 'image' } |
| 12 | |
| 13 | protected _url: string |
| 14 | |
| 15 | protected setUrl(value: string) { |
| 16 | this.__setImageFill(value) |
| 17 | this._url = value |
| 18 | } |
| 19 | |
| 20 | public __setImageFill(value: string): void { |
| 21 | (this as IImageInputData).fill = value ? { type: this.__urlType, mode: 'stretch', url: value } : undefined |
| 22 | } |
| 23 | |
| 24 | public __getData(): IObject { |
| 25 | const data: IImageInputData = super.__getData() |
| 26 | if (data.url) delete data.fill |
| 27 | return data |
| 28 | } |
| 29 | |
| 30 | public __getInputData(names?: string[] | IObject, options?: IJSONOptions): IObject { |
| 31 | const data: IImageInputData = super.__getInputData(names, options) |
| 32 | if (data.url) delete data.fill |
| 33 | return data |
| 34 | } |
| 35 | |
| 36 | } |
nothing calls this directly
no outgoing calls
no test coverage detected