-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug on short sites #1
Comments
Thanks for letting me know. Can you post the page setup with dummy text or send to my email address ([email protected]) for diagnose the issue? Thanks again! |
Sure, no problem! This is a scaled back version, but the bug seems to be consistent on all short sites. <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Demo | start.php</title>
<style type="text/css">
*, *:before, *:after {
margin: 0;
padding: 0;
border: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
display: block;
}
body {
margin: 35px 200px 0;
font-size: 1.25em;
line-height: 1.5em;
background: rgb(39,40,34);
color: rgb(134,134,134);
}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="minimap.min.css" />
<script src="minimap.min.js"></script>
</head>
<body>
<header class="header" role="banner">
<nav role="navigation">
<a class="active" href="">
start <span class="close"></span>
</a>
<a href="about">
about <span class="close"></span>
</a>
<a href="contact">
contact <span class="close"></span>
</a>
</nav>
</header>
<main class="main" role="main">
<div class="text">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<hr>
<h2>Sub heading</h2>
<hr>
</main>
<footer class="footer minimap noselect" role="contentinfo">
<div class="copyright">
<p>Copyright © 2014</p>
</div>
</footer>
<script type="text/javascript">
var previewBody = $('body').minimap({
heightRatio: 0.2,
widthRatio: 0.1,
offsetHeightRatio: 0.06,
offsetWidthRatio: 0
});
</script>
</body>
</html> I'm testing on 1920x1200, both Firefox 33 and chrome 38, and here is an fiddle. |
Added |
Closing this issue for now. |
Hey, sorry for the lack of response. I've been out of town... No, adding
No matter what the content height is, the smallest value for $window.height() will always be the full viewport height, resulting in some weird outstretched minimap if/when the content is shorter than the full viewport. What if you could work around that by using something like |
I am aware of this problem. I assumed that dom content is always bigger than view-port. Thanks! |
If used on a short website (in fact the shorter the weirder behavior), the miniregion height as well as the width/height ratio on the minimap seems to bug... Alot.
This is the 'wrong' behavior:
This is seems to be better:
The text was updated successfully, but these errors were encountered: