summaryrefslogtreecommitdiff
path: root/Master/texmf/asymptote/reload.js
blob: a65268030567969c91f996ed8d8d942361c4df2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Load/reload the document associated with a given path.

// UNIX: Copy to ~/.adobe/Acrobat/x.x/JavaScripts/
// To avoid random window placement we recommend specifying an acroread 
// geometry option, for example: -geometry +0+0

// MSWindows: Copy to %APPDATA%/Adobe/Acrobat/x.x/JavaScripts/

// Note: x.x represents the appropriate Acrobat Reader version number.

reload = app.trustedFunction(function(path) {
	app.beginPriv();
	n=app.activeDocs.length;
	for(i=app.activeDocs.length-1; i >= 0; --i) {
	    Doc=app.activeDocs[i];
	    if(Doc.path == path && Doc != this) {
		Doc.closeDoc();
		break;
	    }
	}
	app.openDoc(path);
	app.endPriv();
    });