mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-02 00:22:59 +00:00
Remove dependency on wiki.js for story-startup and navigator (#4200)
* Update story.js * Update wiki.js * Update navigator.js * Add deprecation console logs to addToHistory and addToStory
This commit is contained in:
@@ -62,6 +62,11 @@ NavigatorWidget.prototype.execute = function() {
|
||||
this.historyTitle = this.getAttribute("history");
|
||||
this.setVariable("tv-story-list",this.storyTitle);
|
||||
this.setVariable("tv-history-list",this.historyTitle);
|
||||
this.story = new $tw.Story({
|
||||
wiki: this.wiki,
|
||||
storyTitle: this.storyTitle,
|
||||
historyTitle: this.historyTitle
|
||||
});
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
@@ -123,7 +128,7 @@ NavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle
|
||||
|
||||
NavigatorWidget.prototype.addToStory = function(title,fromTitle) {
|
||||
if(this.storyTitle) {
|
||||
this.wiki.addToStory(title,fromTitle,this.storyTitle,{
|
||||
this.story.addToStory(title,fromTitle,this.storyTitle,{
|
||||
openLinkFromInsideRiver: this.getAttribute("openLinkFromInsideRiver","top"),
|
||||
openLinkFromOutsideRiver: this.getAttribute("openLinkFromOutsideRiver","top")
|
||||
});
|
||||
@@ -136,7 +141,7 @@ title: a title string or an array of title strings
|
||||
fromPageRect: page coordinates of the origin of the navigation
|
||||
*/
|
||||
NavigatorWidget.prototype.addToHistory = function(title,fromPageRect) {
|
||||
this.wiki.addToHistory(title,fromPageRect,this.historyTitle);
|
||||
this.story.addToHistory(title,fromPageRect,this.historyTitle);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user