Ticket #616: ticket616.patch
| File ticket616.patch, 1.4 KB (added by PhilHawksworth, 4 years ago) |
|---|
-
Story.js
57 57 //# animate - whether to perform animations 58 58 //# customFields - an optional list of name:"value" pairs to be assigned as tiddler fields (for edit templates) 59 59 //# toggle - if true, causes the tiddler to be closed if it is already opened 60 Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle) 60 //# animationSrc - optional. If provided, this will specify the element which is to act as the start of the animation -or- 61 //# the source of the animation will be the srcElement. 62 Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle,animationSrc) 61 63 { 62 64 var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler; 63 65 var tiddlerElem = this.getTiddler(title); … … 71 73 var before = this.positionTiddler(srcElement); 72 74 tiddlerElem = this.createTiddler(place,before,title,template,customFields); 73 75 } 76 if(animationSrc && typeof animationSrc !== "string") { 77 srcElement = animationSrc; 78 } 74 79 if(srcElement && typeof srcElement !== "string") { 75 80 if(config.options.chkAnimate && (animate == undefined || animate == true) && anim && typeof Zoomer == "function" && typeof Scroller == "function") 76 81 anim.startAnimating(new Zoomer(title,srcElement,tiddlerElem),new Scroller(tiddlerElem));
