Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Add icon and additional text to node (Read 12172 times)
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Add icon and additional text to node
Reply #15 - Mar 31st, 2017 at 11:33am
Print Post  
The browser's DOM Image object has width and height properties, so imageObj.width and imageObj.height should give you original size in pixels. I think they are valid only when imageObj.complete is true (indicating download is complete).

Regards,
Slavcho
  
Back to top
 
IP Logged
 
friedel
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 31
Joined: Mar 3rd, 2017
Re: Add icon and additional text to node
Reply #16 - Apr 3rd, 2017 at 8:28am
Print Post  
Is there any method to wait for image download complete? or somehow force it?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Add icon and additional text to node
Reply #17 - Apr 3rd, 2017 at 11:18am
Print Post  
There's the Image.load event, you could attach a handler with usual addEventListener method -

Code
Select All
// image is instance of DOM Image, not Mindfusion.Drawing.Image
image.addEventListener("load", function () {} ); 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint