1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Fix problem with zoomin storyview and hidden sidebar

Fixes #933
This commit is contained in:
Jermolene 2014-10-06 09:18:29 +01:00
parent c126294ae5
commit 5dd6ebff05
2 changed files with 17 additions and 9 deletions

View File

@ -35,7 +35,7 @@ var ZoominListView = function(listWidget) {
} else {
self.currentTiddlerDomNode = domNode;
}
domNode.style.position = "absolute";
$tw.utils.addClass(domNode,"tc-storyview-zoomin-tiddler");
});
};
@ -52,9 +52,8 @@ ZoominListView.prototype.navigateTo = function(historyInfo) {
return;
}
// Make the new tiddler be position absolute and visible so that we can measure it
$tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
{position: "absolute"},
{display: "block"},
{transformOrigin: "0 0"},
{transform: "translateX(0px) translateY(0px) scale(1)"},
{transition: "none"},
@ -134,9 +133,9 @@ ZoominListView.prototype.insert = function(widget) {
return;
}
// Make the newly inserted node position absolute and hidden
$tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
{display: "none"},
{position: "absolute"}
{display: "none"}
]);
};
@ -152,9 +151,8 @@ ZoominListView.prototype.remove = function(widget) {
return;
}
// Set up the tiddler that is being closed
$tw.utils.addClass(targetElement,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(targetElement,[
{position: "absolute"},
{display: "block"},
{transformOrigin: "50% 50%"},
{transform: "translateX(0px) translateY(0px) scale(1)"},
{transition: "none"},
@ -168,9 +166,8 @@ ZoominListView.prototype.remove = function(widget) {
var toWidgetDomNode = toWidget && toWidget.findFirstDomNode();
// Set up the tiddler we're moving back in
if(toWidgetDomNode) {
$tw.utils.addClass(toWidgetDomNode,"tc-storyview-zoomin-tiddler");
$tw.utils.setStyle(toWidgetDomNode,[
{position: "absolute"},
{display: "block"},
{transformOrigin: "50% 50%"},
{transform: "translateX(0px) translateY(0px) scale(10)"},
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing},

View File

@ -850,6 +850,17 @@ canvas.tc-edit-bitmapeditor {
width: 10%;
}
/*
** Storyview Classes
*/
.tc-storyview-zoomin-tiddler {
position: absolute;
display: block;
width: 100%;
width: calc(100% - 84px);
}
/*
** Dropdowns
*/