OpenLayers OpenLayers

Ticket #572: id.patch

File id.patch, 1.1 kB (added by euzuro, 2 years ago)
  • lib/OpenLayers/Util.js

    old new  
    175175 
    176176    image = document.createElement("img"); 
    177177 
     178    //set generic properties 
     179    if (!id) { 
     180        id = OpenLayers.Util.createUniqueID("OpenLayersDiv"); 
     181    } 
     182    if (!position) { 
     183        position = "relative"; 
     184    } 
     185    OpenLayers.Util.modifyDOMElement(image, id, px, sz, position,  
     186                                     border, null, opacity); 
     187 
    178188    if(delayDisplay) { 
    179189        image.style.display = "none"; 
    180190        OpenLayers.Event.observe(image, "load",  
     
    191201        image.src = imgURL; 
    192202    } 
    193203 
    194     //set generic properties 
    195     if (!id) { 
    196         id = OpenLayers.Util.createUniqueID("OpenLayersDiv"); 
    197     } 
    198     if (!position) { 
    199         position = "relative"; 
    200     } 
    201     OpenLayers.Util.modifyDOMElement(image, id, px, sz, position,  
    202                                      border, null, opacity); 
    203204 
    204205         
    205206    return image;