Gitlab CSE Unil

Commit 2b49e6dd authored by Julien Furrer's avatar Julien Furrer
Browse files

CSS Fix: adjust Navbar title when window resized

parent 3225faa4
......@@ -267,8 +267,25 @@ function($, Signal, paper, config, view, io, tools, attributes, exporter, AnObjM
);
_reservedHeight = ( $("#canvas-col").offset().top + _canvasToolBar.outerHeight() + 20 );
// The amount of window width needed for navbar elements other than anobj title
var _$mainNavBar = $("#main-navbar");
var _navBarTitleDelta = (function(){
var navHeader = _$mainNavBar.find(".navbar-header"),
navRight = _$mainNavBar.find(".navbar-right"),
navTitle = _$mainNavBar.find(".adim-image-name"),
value;
value = navHeader.offset().left + navHeader.outerWidth() +
navRight.outerWidth() +
( navTitle.outerWidth() - navTitle.width() ) + 25;
navTitle.find(".text").css("max-width", _$w.width() - value);
return value;
})();
_$w.on('resize', function(){
adjustCanvasToImage();
_$mainNavBar.find(".adim-image-name .text").css("max-width", _$w.width() - _navBarTitleDelta);
});
$("#side-col-panel-group .panel-collapse")
......
......@@ -508,6 +508,10 @@ body {
box-shadow: 0 0 2px 0px #3d3d3d;
}
#main-navbar .adim-image-name .text {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 18px;
line-height: 1;
font-weight: 300;
......
......@@ -92,7 +92,13 @@ html, body {
}
.adim-image-name {
.text {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 18px;
line-height: 1;
font-weight: 300;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment