From 0b9d353145660ea802d50f2c3e177976ac26724c Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 10 Oct 2017 10:24:09 +0200 Subject: SONAR-9690 Improve positioning of secondary locations markers --- server/sonar-web/src/main/js/components/common/LocationIndex.css | 6 ++++++ server/sonar-web/src/main/js/components/common/LocationIndex.js | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'server/sonar-web/src/main/js/components/common') diff --git a/server/sonar-web/src/main/js/components/common/LocationIndex.css b/server/sonar-web/src/main/js/components/common/LocationIndex.css index 73b5cd8986e..a1da0ffdefd 100644 --- a/server/sonar-web/src/main/js/components/common/LocationIndex.css +++ b/server/sonar-web/src/main/js/components/common/LocationIndex.css @@ -21,6 +21,12 @@ background-color: #ccc; } +.location-index.is-leading { + position: absolute; + margin: 1px 0 0 -4px !important; + transform: translateX(-100%); +} + .location-index[tabindex] { cursor: pointer; } diff --git a/server/sonar-web/src/main/js/components/common/LocationIndex.js b/server/sonar-web/src/main/js/components/common/LocationIndex.js index 2effb6e44ca..43ddc0de0bf 100644 --- a/server/sonar-web/src/main/js/components/common/LocationIndex.js +++ b/server/sonar-web/src/main/js/components/common/LocationIndex.js @@ -25,18 +25,22 @@ import './LocationIndex.css'; /*:: type Props = { children?: React.Element<*>, + leading?: boolean, onClick?: () => void, selected?: boolean }; */ export default function LocationIndex(props /*: Props */) { - const { children, onClick, selected, ...other } = props; + const { children, leading, onClick, selected, ...other } = props; const clickAttributes = onClick ? { onClick, role: 'button', tabIndex: 0 } : {}; // put {...others} because Tooltip sets some event handlers return ( -
+
{children}
); -- cgit v1.2.3