mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-13 05:19:58 +00:00
update view widget
This commit is contained in:
parent
cfaca1b21c
commit
4a0f2a5a2f
@ -83,6 +83,18 @@ ViewHandler.prototype.createFakeWidget = function() {
|
||||
this.fakeWidget.renderChildren(this.fakeNode,null);
|
||||
};
|
||||
|
||||
ViewHandler.prototype.refreshWikified = function(changedTiddlers) {
|
||||
var refreshed = this.fakeWidget.refresh(changedTiddlers);
|
||||
if(refreshed) {
|
||||
var newText = this.getValue();
|
||||
if(newText !== this.text) {
|
||||
this.widget.domNodes[0].textContent = newText;
|
||||
this.text = newText;
|
||||
}
|
||||
}
|
||||
return refreshed;
|
||||
};
|
||||
|
||||
/*
|
||||
Base ViewHandler refresh method
|
||||
*/
|
||||
@ -191,15 +203,7 @@ ViewWidget.prototype.initialiseHTMLWikifiedView = function(View) {
|
||||
};
|
||||
|
||||
View.prototype.refresh = function(changedTiddlers) {
|
||||
var refreshed = this.fakeWidget.refresh(changedTiddlers);
|
||||
if(refreshed) {
|
||||
var newText = this.getValue();
|
||||
if(newText !== this.text) {
|
||||
self.domNodes[0].textContent = newText;
|
||||
this.text = newText;
|
||||
}
|
||||
}
|
||||
return refreshed;
|
||||
return this.refreshWikified(changedTiddlers);
|
||||
};
|
||||
return View;
|
||||
};
|
||||
@ -219,15 +223,7 @@ ViewWidget.prototype.initialisePlainWikifiedView = function(View) {
|
||||
};
|
||||
|
||||
View.prototype.refresh = function(changedTiddlers) {
|
||||
var refreshed = this.fakeWidget.refresh(changedTiddlers);
|
||||
if(refreshed) {
|
||||
var newText = this.getValue();
|
||||
if(newText !== this.text) {
|
||||
self.domNodes[0].textContent = newText;
|
||||
this.text = newText;
|
||||
}
|
||||
}
|
||||
return refreshed;
|
||||
return this.refreshWikified(changedTiddlers);
|
||||
};
|
||||
return View;
|
||||
};
|
||||
@ -247,15 +243,7 @@ ViewWidget.prototype.initialiseHTMLEncodedPlainWikifiedView = function(View) {
|
||||
};
|
||||
|
||||
View.prototype.refresh = function(changedTiddlers) {
|
||||
var refreshed = this.fakeWidget.refresh(changedTiddlers);
|
||||
if(refreshed) {
|
||||
var newText = this.getValue();
|
||||
if(newText !== this.text) {
|
||||
self.domNodes[0].textContent = newText;
|
||||
this.text = newText;
|
||||
}
|
||||
}
|
||||
return refreshed;
|
||||
return this.refreshWikified(changedTiddlers);
|
||||
};
|
||||
return View;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user