Skip to content

Commit 85b39d6

Browse files
committed
Fixed scaling of text in schedule display
1 parent b0f815d commit 85b39d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

assets/src/modules/sm/Schedule/directives/svgTextLineDirective.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ angular.module('sm').directive('svgTextLine', function() {
44
var text = attrs.svgTextLine;
55
var adjust = (scope.print)? 1: 0;
66
var cutoff = 25 + (adjust * -7);
7-
if(scope.grid.days.length > 3) {
8-
if(text.length > 14) {
7+
8+
if (scope.grid.days.length > 3) {
9+
if (text.length > 14) {
910
element = elm.get(0);
10-
element.setAttribute("textLength", (parseFloat(scope.grid.opts.daysWidth) + 1 - adjust )+ "%");
11+
element.setAttribute("textLength", (parseFloat(scope.grid.opts.daysWidth) + 1 - 2) + "%");
1112
element.setAttribute("lengthAdjust", "spacingAndGlyphs");
1213
}
13-
if(text.length > cutoff) {
14+
if (text.length > cutoff) {
1415
text = text.slice(0, cutoff - 3) + '...';
1516
}
1617
}

0 commit comments

Comments
 (0)