Niceties for JSHint

This commit is contained in:
Jeremy Ruston
2012-08-02 22:32:34 +01:00
parent 3ade3397fb
commit c11743088a
5 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ ClassicScroller.prototype.remove = function(storyElementNode) {
wrapperElement.style[$tw.browser.transform] = "translateX(0px)";
wrapperElement.style.opacity = "1.0";
wrapperElement.style.height = currHeight + "px";
wrapperElement.offsetWidth; // Force layout
$tw.utils.forceLayout(wrapperElement);
wrapperElement.style[$tw.browser.transform] = "translateX(" + window.innerWidth + "px)";
wrapperElement.style.opacity = "0.0";
wrapperElement.style.height = "0px";
+1 -1
View File
@@ -74,7 +74,7 @@ SidewaysView.prototype.remove = function(storyElementNode) {
}
},true);
// Animate
wrapperElement.offsetWidth; // Force layout
$tw.utils.forceLayout(wrapperElement);
wrapperElement.style[$tw.browser.transform] = "translateY(" + window.innerHeight + "px)";
wrapperElement.style.opacity = "0.0";
wrapperElement.style.width = "0px";
+3 -4
View File
@@ -94,7 +94,7 @@ Zoomin.prototype.navigateForward = function(toStoryElement,fromStoryElement,hist
prevCurrentTiddler = this.currentTiddler;
this.currentTiddler = toStoryElement;
// Force layout
this.storyNode.offsetWidth;
$tw.utils.forceLayout(this.storyNode);
// Transform the target tiddler to its natural size
toStoryElement.domNode.style[$tw.browser.transition] = "-" + $tw.browser.prefix.toLowerCase() + "-transform " + d + " ease-in-out, opacity " + d + " ease-out";
toStoryElement.domNode.style.opacity = "1.0";
@@ -102,7 +102,7 @@ Zoomin.prototype.navigateForward = function(toStoryElement,fromStoryElement,hist
toStoryElement.domNode.style.zIndex = "500";
// Transform the previous tiddler out of the way and then hide it
if(prevCurrentTiddler && prevCurrentTiddler !== toStoryElement) {
var scale = titleBounds.width / sourceBounds.width;
scale = titleBounds.width / sourceBounds.width;
x = titleBounds.left - targetBounds.left - (sourceBounds.left - targetBounds.left) * scale;
y = titleBounds.top - targetBounds.top - (sourceBounds.top - targetBounds.top) * scale;
prevCurrentTiddler.domNode.style[$tw.browser.transition] = "-" + $tw.browser.prefix.toLowerCase() + "-transform " + d + " ease-in-out, opacity " + d + " ease-out";
@@ -154,8 +154,7 @@ Zoomin.prototype.remove = function(storyElement,storyElementIndex) {
this.currentTiddler = toStoryElement;
}
// Animate them both
// Force layout
this.storyNode.offsetWidth;
$tw.utils.forceLayout(this.storyNode);
// First, the tiddler we're closing
storyElement.domNode.style[$tw.browser.transition] = "-" + $tw.browser.prefix.toLowerCase() + "-transform " + d + " ease-in-out, opacity " + d + " ease-out";
storyElement.domNode.style.opacity = "0.0";