mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-02 12:16:55 +00:00
Revised test data
Testing against the output of cook.rb isn't satisfactory because of the bugs in it; instead we're now going to test against the tiddlywiki.com build products
This commit is contained in:
21
test/tiddlywiki.2.6.5/source/tiddlywiki/js/Zoomer.js
Executable file
21
test/tiddlywiki.2.6.5/source/tiddlywiki/js/Zoomer.js
Executable file
@@ -0,0 +1,21 @@
|
||||
//--
|
||||
//-- Zoomer animation
|
||||
//--
|
||||
|
||||
function Zoomer(text,startElement,targetElement,unused)
|
||||
{
|
||||
var e = createTiddlyElement(document.body,"div",null,"zoomer");
|
||||
createTiddlyElement(e,"div",null,null,text);
|
||||
var winWidth = findWindowWidth();
|
||||
var winHeight = findWindowHeight();
|
||||
var p = [
|
||||
{style: 'left', start: findPosX(startElement), end: findPosX(targetElement), template: '%0px'},
|
||||
{style: 'top', start: findPosY(startElement), end: findPosY(targetElement), template: '%0px'},
|
||||
{style: 'width', start: Math.min(startElement.scrollWidth,winWidth), end: Math.min(targetElement.scrollWidth,winWidth), template: '%0px', atEnd: 'auto'},
|
||||
{style: 'height', start: Math.min(startElement.scrollHeight,winHeight), end: Math.min(targetElement.scrollHeight,winHeight), template: '%0px', atEnd: 'auto'},
|
||||
{style: 'fontSize', start: 8, end: 24, template: '%0pt'}
|
||||
];
|
||||
var c = function(element,properties) {jQuery(element).remove();};
|
||||
return new Morpher(e,config.animDuration,p,c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user