Skip to content

Commit

Permalink
Merge branch 'release/v1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeyer42 committed May 20, 2020
2 parents 4eeb647 + e36159d commit f718863
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.0.2](https://github.com/cloudogu/warp-menu/releases/tag/v1.0.2)
### Fixed
- fix that some dogus affect the design of the warp menu
- fix that the area around the tooltip is not clickable
- make the warp menu wider in desktop view

## [v1.0.1](https://github.com/cloudogu/warp-menu/releases/tag/v1.0.1)
### Fixed
- fix resize issue for large mobile displays
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-menu",
"version": "1.0.1",
"version": "1.0.2",
"repository": {
"type": "git",
"url": "https://github.com/cloudogu/warp-menu"
Expand Down
10 changes: 7 additions & 3 deletions src/warp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var baseUrl = '';
var desktopViewColumnWidthInPx = 245;

var head = document.getElementsByTagName('head')[0];
var body = document.getElementsByTagName('body')[0];
Expand Down Expand Up @@ -202,8 +203,11 @@ function isTooltipDisabled() {

function addLogoutMenuEntry(list) {
var placeholder = document.createElement('li');
placeholder.innerText = '\xa0';
addClass(placeholder, 'warp-menu-logout-placeholder');
var placeholderChild = document.createElement('div');
placeholderChild.innerText = '\xa0';
placeholder.appendChild(placeholderChild);

var logout = document.createElement('li');
addClass(logout, 'warp-menu-logout-list-element');
var logoutHref = document.createElement('a');
Expand Down Expand Up @@ -393,7 +397,7 @@ function setCorrectColumnCount() {

for (var i = 0; i < list.childNodes.length; i++) {
var node = list.childNodes[i];
var current = Math.floor(node.offsetLeft / 192) + 1;
var current = Math.floor(node.offsetLeft / desktopViewColumnWidthInPx) + 1;

if (hasClass(node, 'warp-menu-logout-list-element'))
continue; // Skip logout button because it is positioned outside of list
Expand All @@ -405,7 +409,7 @@ function setCorrectColumnCount() {

var largeScreen = window.matchMedia('(min-width: 897px)');
if (largeScreen.matches) {
shiftContainer.style.width = 'calc(' + columnCount + ' * 192px)';
shiftContainer.style.width = 'calc(' + columnCount + ' * ' + desktopViewColumnWidthInPx + 'px)';
list.style.columnCount = columnCount;
}
}
Expand Down

0 comments on commit f718863

Please sign in to comment.