-import Clipboard from "clipboard";
+import Clipboard from "clipboard/dist/clipboard.min";
import Code from "../services/code";
class PageDisplay {
let $bookTreeParent = $sidebar.parent();
// Check the page is scrollable and the content is taller than the tree
- let pageScrollable = ($(document).height() > $window.height()) && ($sidebar.height() < $('.page-content').height());
+ let pageScrollable = ($(document).height() > ($window.height() + 40)) && ($sidebar.height() < $('.page-content').height());
// Get current tree's width and header height
let headerHeight = $("#header").height() + $(".toolbar").height();
// Fix the tree as a sidebar
function stickTree() {
- $sidebar.width($bookTreeParent.width() + 15);
+ $sidebar.css('width', $bookTreeParent.width());
$sidebar.addClass("fixed");
isFixed = true;
}
}
}
-module.exports = PageDisplay;
+export default PageDisplay;