[Rt-commit] rt branch, 5.0/try-to-not-wrap-label-tooltips, repushed
? sunnavy
sunnavy at bestpractical.com
Wed Jun 10 15:06:04 EDT 2020
The branch 5.0/try-to-not-wrap-label-tooltips was deleted and repushed:
was e14a2cf31365a4a1297c3ae8c71becc7b8ac45b8
now 4383e1aa952935630077b99e32e4157f4c853554
1: e14a2cf313 ! 1: 4383e1aa95 Try a bit harder to not wrap label tooltips
@@ -21,9 +21,8 @@
trigger: 'hover focus'
});
+
-+ // Try harder to not wrap tooltips. If tooltip icons don't exceed
-+ // label column's outer boundary(i.e. they could take the
-+ // padding-right room), keep them in one row with label text.
++ // Try harder to not wrap tooltips. If tooltip icons don't collapse
++ // with the following content, keep them in one row with label text.
+ jQuery('div.label > svg[data-toggle="tooltip"]').each( function() {
+ var svg = jQuery(this);
+ var label = jQuery(this).parent();
@@ -31,9 +30,9 @@
+ if ( value.length ) {
+ var origin = label.css('white-space');
+ label.css('white-space', 'nowrap');
-+ console.log(svg.offset().left + svg.width() + parseInt(svg.css('padding-left')) );
-+ console.log(value.offset().left+ parseInt(value.css('padding-left')));
-+ if ( svg.offset().left + svg.width() + parseInt(svg.css('padding-left')) > value.offset().left + parseInt(value.css('padding-left')) ) {
++ var svg_content_right = svg.offset().left + svg.width() + parseInt(svg.css('padding-left'));
++ var value_content_left = value.offset().left + parseInt(value.css('padding-left'));
++ if ( svg_content_right >= value_content_left ) {
+ label.css('white-space', origin);
+ }
+ }
More information about the rt-commit
mailing list