Adobe 65007312 Programming Guide - Page 141
document.liveUpdate, document.liveUpdateImageSize
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 141 highlights
CHAPTER 6: Writing a Web-engine Plug-in Web HTML Live Update 141 which may need to be cleared. Your live-update function signals Lightroom about what behavior to use by returning one of these strings: X invalidateOldHTML: The browser cache is cleared, and all of the HTML pages in Lightroom's page cache are cleared. The exported JPEGs remain unchanged. The reload is deferred until the user navigates away from the currently previewed page. Return this value if the update is successful, and the change affects only the current HTML page X invalidateAllContent: The browser cache is cleared, and all of Lightroom's page caches (both HTML and resource files) are cleared. The exported JPEGs remain unchanged. The reload is deferred until the user navigates away from the currently previewed page. Return this value if the update is successful, and the change affects any referenced file, such as a JavaScript or CSS file. This is typically the default case. X failed (or any other return, or throwing an exception): Causes immediate reload, and clearing of both browser and Lightroom page caches. The exported JPEGs remain unchanged. Return this value if your function is unable to update the page. Lightroom then commands the embedded browser to reload the original page. document.liveUpdate Your HTML gallery can implement this function to respond to a change made in Lightroom to the appearance (CSS styling), or a Lightroom update to the fixed strings for the gallery. (Do not use it for changes to strings associated with a particular image, such as the image name or other metadata; a change of this kind always causes a reload.) Your function manipulates the web page objects using JavaScript calls; typically, it locates the document node and alters the page appearance or content to reflect the change made to the data values. The function should return a result that indicates whether the update was successful. The prototype is: document.liveUpdate = function( path, newValue, cssId, property ) { var result = "failed"; // JavaScript implementation goes here return result; } path newValue cssId property A dot-separated path to the node in the appearance portion of your galleryInfo.lrweb file. The new value (such as "ffffff" for the color white). The corresponding cssId for the node (such as 'body'). The CSS property that is changing on this node (such as 'margin'). document.liveUpdateImageSize Implement a separate function for live update of image size. This function is called repeatedly while the mouse is held down on the image size slider. As soon as the mouse is released, a full reload of the page occurs, flushing all caches and invalidating all JPEGs.