diff --git a/core/modules/widgets/list/listviews/zoomin.js b/core/modules/widgets/list/listviews/zoomin.js new file mode 100644 index 000000000..32c9d32ab --- /dev/null +++ b/core/modules/widgets/list/listviews/zoomin.js @@ -0,0 +1,146 @@ +/*\ +title: $:/core/modules/widgets/list/listviews/zoomin.js +type: application/javascript +module-type: listview + +Zooms between individual tiddlers + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +var ZoominListView = function(listWidget) { + this.listWidget = listWidget; + this.storyNode = this.listWidget.renderer.domNode; + // Set the current tiddler + this.currentTiddler = this.listWidget.children[0]; + // Make all the tiddlers position absolute, and hide all but the first one + this.storyNode.style.position = "relative"; + for(var t=0; t widget +*/ +function findTitleNode(node) { + var t,r; + // Return true if this node is a view widget with the field attribute set to "title" + if(node instanceof $tw.WikiRenderTree.prototype.rendererClasses.element) { + if(node.widget instanceof $tw.WikiRenderTree.prototype.rendererClasses.element.prototype.widgetClasses.view && node.attributes.field === "title") { + return node; + } + if(node.widget.children) { + for(t=0; t