1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-19 18:59:42 +00:00
TiddlyWiki5/core/modules/macros/story/views/classic.js
2012-06-20 22:20:48 +01:00

32 lines
856 B
JavaScript

/*\
title: $:/core/modules/macros/story/views/classic.js
type: application/javascript
module-type: storyview
A storyview that shows a sequence of tiddlers and navigates by smoothly scrolling
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function ClassicScroller(story) {
this.story = story;
}
/*
Visualise navigation to the specified tiddler macro, optionally specifying a source node for the visualisation
targetTiddlerNode: tree node of the tiddler macro we're navigating to
isNew: true if the node we're navigating to has just been added to the DOM
sourceNode: optional tree node that initiated the navigation
*/
ClassicScroller.prototype.navigate = function(targetTiddlerNode,isNew,sourceEvent) {
$tw.utils.scrollIntoView(targetTiddlerNode.domNode);
};
exports.classic = ClassicScroller;
})();