mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Make the insert- and remove-animations of storyviews work in new windows (#5755)
* Make classic storyview work in new windows, too * Make pop storyview work in new windows, too * Make zoomin storyview insert and remove animation work in new windows, too
This commit is contained in:
parent
056e6541a1
commit
2b911ac11f
@ -43,7 +43,7 @@ ClassicStoryView.prototype.insert = function(widget) {
|
|||||||
if(duration) {
|
if(duration) {
|
||||||
var targetElement = widget.findFirstDomNode();
|
var targetElement = widget.findFirstDomNode();
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!(targetElement instanceof Element)) {
|
if(targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Get the current height of the tiddler
|
// Get the current height of the tiddler
|
||||||
@ -83,7 +83,7 @@ ClassicStoryView.prototype.remove = function(widget) {
|
|||||||
widget.removeChildDomNodes();
|
widget.removeChildDomNodes();
|
||||||
};
|
};
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!(targetElement instanceof Element)) {
|
if(targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
removeElement();
|
removeElement();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -118,4 +118,4 @@ ClassicStoryView.prototype.remove = function(widget) {
|
|||||||
|
|
||||||
exports.classic = ClassicStoryView;
|
exports.classic = ClassicStoryView;
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -35,7 +35,7 @@ PopStoryView.prototype.insert = function(widget) {
|
|||||||
var targetElement = widget.findFirstDomNode(),
|
var targetElement = widget.findFirstDomNode(),
|
||||||
duration = $tw.utils.getAnimationDuration();
|
duration = $tw.utils.getAnimationDuration();
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!(targetElement instanceof Element)) {
|
if(targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Reset once the transition is over
|
// Reset once the transition is over
|
||||||
@ -77,7 +77,7 @@ PopStoryView.prototype.remove = function(widget) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!(targetElement instanceof Element)) {
|
if(targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
removeElement();
|
removeElement();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ function findTitleDomNode(widget,targetClass) {
|
|||||||
ZoominListView.prototype.insert = function(widget) {
|
ZoominListView.prototype.insert = function(widget) {
|
||||||
var targetElement = widget.findFirstDomNode();
|
var targetElement = widget.findFirstDomNode();
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!(targetElement instanceof Element)) {
|
if(targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Make the newly inserted node position absolute and hidden
|
// Make the newly inserted node position absolute and hidden
|
||||||
@ -147,7 +147,7 @@ ZoominListView.prototype.remove = function(widget) {
|
|||||||
widget.removeChildDomNodes();
|
widget.removeChildDomNodes();
|
||||||
};
|
};
|
||||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||||
if(!(targetElement instanceof Element)) {
|
if(targetElement.nodeType === Node.TEXT_NODE) {
|
||||||
removeElement();
|
removeElement();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user