Adobe 65007312 - Photoshop Lightroom Programmer's Manual page 141

Mac
Hide thumbs Also See for 65007312 - Photoshop Lightroom:
Table of Contents

Advertisement

C
6: Writing a Web-engine Plug-in
HAPTER
which may need to be cleared. Your live-update function signals Lightroom about what behavior to use by
returning one of these strings:
invalidateOldHTML
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
invalidateAllContent
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.
failed
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
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.
: The browser cache is cleared, and all of the HTML pages in Lightroom's page
: The browser cache is cleared, and all of Lightroom's page caches (both
(or any other return, or throwing an exception): Causes immediate reload, and clearing of both
A dot-separated path to the node in the
galleryInfo.lrweb
The new value (such as
The corresponding
The CSS property that is changing on this node (such as
appearance
file.
for the color white).
"ffffff"
for the node (such as
cssId
Web HTML Live Update 141
portion of your
).
'body'
).
'margin'

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop lightroom sdk 3.0

Table of Contents