Skip to content
Extraits de code Groupes Projets
Valider 40160d74 rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Anchor segment editor on right and show on left when not enough space to show on right.

parent f6d5fe0a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -815,6 +815,14 @@ Segmentation = (function($) { ...@@ -815,6 +815,14 @@ Segmentation = (function($) {
self.form = getFormHtml(); self.form = getFormHtml();
self.target.prepend(self.form); self.target.prepend(self.form);
// if there's enough space to the left & not enough space to the right,
// anchor the form to the right of the selector
if (self.form.width() + self.target.offset().left > $(window).width()
&& self.form.width() < self.target.offset().left + self.target.width()
) {
self.form.addClass('anchorRight');
}
bindFormEvents(); bindFormEvents();
bindSegmentManipulationEvents(); bindSegmentManipulationEvents();
......
...@@ -698,4 +698,9 @@ a.metric_category { ...@@ -698,4 +698,9 @@ a.metric_category {
.segmentEditorPanel.visible { .segmentEditorPanel.visible {
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
}
.segment-element.anchorRight {
right:-1px;
left:auto;
} }
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter