Override public function invalidateProperties (): void {super. invalidateProperties (); setImage ();} private function setImage (): void {if (image) {try {var cls: Class = getDefinitionByName ("zorn. external. externalCall ") as Class; image. source = ".. /resources/districticons/"+ districtId + ". png ");} catch (e: Error) {var cls: Class = getDefinitionByName (" com. util. resourceURL ") as Class; var ret: String = cls [" create "] (" districticons/"+ districtId + ". png "); image. source = ret ;}}}
Recently, the project encountered such a requirement that the Image component should be used to load external images. The length and width of these external images are different. How can we adjust the x and y of these images, to make these images fit, you can think of a way to run the entire project and open the panel where these mage components are located, then, record how to adjust the x and y attributes of each Image in the book. If not, re-run the entire project and run it again.
There is no error in this method, that is, low productivity. A better method is to use the above Code.
Here, we will explain that 'zorn. external. externalcall' cannot find this package path in our entire project file. Our frontend leader found this string through decompilation.