15
15
< div class ="header low ">
16
16
< h1 > Code coverage report for < span class ="entity "> src/ng-reading-indicator.js</ span > </ h1 >
17
17
< h2 >
18
- Statements: < span class ="metric "> 32.95 % < small > (29 / 88 )</ small > </ span >
19
- Branches: < span class ="metric "> 18.18 % < small > (14 / 77 )</ small > </ span >
20
- Functions: < span class ="metric "> 46.67 % < small > (7 / 15 )</ small > </ span >
21
- Lines: < span class ="metric "> 32.95 % < small > (29 / 88 )</ small > </ span >
18
+ Statements: < span class ="metric "> 32.22 % < small > (29 / 90 )</ small > </ span >
19
+ Branches: < span class ="metric "> 16.09 % < small > (14 / 87 )</ small > </ span >
20
+ Functions: < span class ="metric "> 43.75 % < small > (7 / 16 )</ small > </ span >
21
+ Lines: < span class ="metric "> 32.22 % < small > (29 / 90 )</ small > </ span >
22
22
Ignored: < span class ="metric "> < span class ="ignore-none "> none</ span > </ span >
23
23
</ h2 >
24
24
< div class ="path "> < a href ="../index.html "> All files</ a > » < a href ="index.html "> src/</ a > » ng-reading-indicator.js</ div >
@@ -217,7 +217,14 @@ <h2>
217
217
190
218
218
191
219
219
192
220
- 193</ td > < td class ="line-coverage "> < span class ="cline-any cline-yes "> 1</ span >
220
+ 193
221
+ 194
222
+ 195
223
+ 196
224
+ 197
225
+ 198
226
+ 199
227
+ 200</ td > < td class ="line-coverage "> < span class ="cline-any cline-yes "> 1</ span >
221
228
< span class ="cline-any cline-neutral "> </ span >
222
229
< span class ="cline-any cline-neutral "> </ span >
223
230
< span class ="cline-any cline-yes "> 1</ span >
268
275
< span class ="cline-any cline-neutral "> </ span >
269
276
< span class ="cline-any cline-neutral "> </ span >
270
277
< span class ="cline-any cline-neutral "> </ span >
278
+ < span class ="cline-any cline-neutral "> </ span >
279
+ < span class ="cline-any cline-neutral "> </ span >
271
280
< span class ="cline-any cline-yes "> 1</ span >
272
281
< span class ="cline-any cline-yes "> 1</ span >
273
282
< span class ="cline-any cline-yes "> 2</ span >
307
316
< span class ="cline-any cline-neutral "> </ span >
308
317
< span class ="cline-any cline-neutral "> </ span >
309
318
< span class ="cline-any cline-no "> </ span >
310
- < span class ="cline-any cline-no "> </ span >
311
319
< span class ="cline-any cline-neutral "> </ span >
312
320
< span class ="cline-any cline-no "> </ span >
313
321
< span class ="cline-any cline-neutral "> </ span >
@@ -346,8 +354,15 @@ <h2>
346
354
< span class ="cline-any cline-neutral "> </ span >
347
355
< span class ="cline-any cline-neutral "> </ span >
348
356
< span class ="cline-any cline-no "> </ span >
357
+ < span class ="cline-any cline-no "> </ span >
358
+ < span class ="cline-any cline-no "> </ span >
359
+ < span class ="cline-any cline-neutral "> </ span >
360
+ < span class ="cline-any cline-neutral "> </ span >
361
+ < span class ="cline-any cline-no "> </ span >
362
+ < span class ="cline-any cline-neutral "> </ span >
349
363
< span class ="cline-any cline-neutral "> </ span >
350
364
< span class ="cline-any cline-no "> </ span >
365
+ < span class ="cline-any cline-neutral "> </ span >
351
366
< span class ="cline-any cline-no "> </ span >
352
367
< span class ="cline-any cline-no "> </ span >
353
368
< span class ="cline-any cline-no "> </ span >
377
392
< span class ="cline-any cline-neutral "> </ span >
378
393
< span class ="cline-any cline-no "> </ span >
379
394
< span class ="cline-any cline-no "> </ span >
380
- < span class ="cline-any cline-neutral "> </ span >
381
395
< span class ="cline-any cline-no "> </ span >
382
396
< span class ="cline-any cline-no "> </ span >
383
397
< span class ="cline-any cline-no "> </ span >
@@ -453,10 +467,12 @@ <h2>
453
467
topOffset: 150,
454
468
readingTime: {
455
469
enable: true,
456
- prefix: 'estimate ca. ',
457
- suffix: 'min',
470
+ prefix: 'remaining estimate ',
471
+ minutesSuffix: 'min',
472
+ secondsSuffix: 'sec',
458
473
speed: 150,
459
- seconds: false
474
+ seconds: true,
475
+ secondInterval: 5
460
476
}
461
477
};
462
478
499
515
}
500
516
501
517
< span class ="cstat-no " title ="statement not covered " > scope.headline = (headline) ? headline : null;</ span >
502
- < span class ="cstat-no " title ="statement not covered " > scope.readingTime = (options.readingTime.enable) ? calculateReadingTime() : null;</ span >
503
518
504
519
< span class ="cstat-no " title ="statement not covered " > updateSize();</ span >
505
520
@@ -537,10 +552,17 @@ <h2>
537
552
< span class ="cstat-no " title ="statement not covered " > progress = (scrollPos <= top) ? 0 : (((scrollPos-top)+((top + height) - (document.body.offsetHeight - window.innerHeight))) / bottom) * 100;</ span >
538
553
}
539
554
555
+ < span class ="cstat-no " title ="statement not covered " > if (options.readingTime.enable) {</ span >
556
+ < span class ="cstat-no " title ="statement not covered " > scope.$apply( < span class ="fstat-no " title ="function not covered " > function(){</ span > </ span >
557
+ < span class ="cstat-no " title ="statement not covered " > scope.readingTime = calculateReadingTime();</ span >
558
+ });
559
+ } else {
560
+ < span class ="cstat-no " title ="statement not covered " > scope.readingTime = null;</ span >
561
+ }
562
+
540
563
< span class ="cstat-no " title ="statement not covered " > progressBar.style.width = progress + '%';</ span >
541
564
542
565
< span class ="cstat-no " title ="statement not covered " > if (options.expand) {</ span >
543
- < span class ="cstat-no " title ="statement not covered " > console.log(scrollPos, top, (expandOffset.top + options.topOffset) );</ span >
544
566
< span class ="cstat-no " title ="statement not covered " > if (scrollPos > top && scrollPos < (top + expandOffset.top + options.topOffset)) {</ span >
545
567
< span class ="cstat-no " title ="statement not covered " > angular.element(element)[0].style.height = '5px';</ span >
546
568
< span class ="cstat-no " title ="statement not covered " > angular.element(element).addClass('ng-reading-indicator-shrink');</ span >
@@ -567,15 +589,14 @@ <h2>
567
589
< span class ="cstat-no " title ="statement not covered " > minutes++;</ span >
568
590
}
569
591
570
- < span class ="cstat-no " title ="statement not covered " > estimate += (minutes <= 9 ? '0' : '');</ span >
571
- < span class ="cstat-no " title ="statement not covered " > estimate += minutes;</ span >
572
-
573
- < span class ="cstat-no " title ="statement not covered " > if (options.readingTime.seconds) {</ span >
574
- < span class ="cstat-no " title ="statement not covered " > estimate += ':';</ span >
575
- < span class ="cstat-no " title ="statement not covered " > estimate += (seconds <= 9 ? '0' : '');</ span >
576
- < span class ="cstat-no " title ="statement not covered " > estimate += seconds;</ span >
592
+ < span class ="cstat-no " title ="statement not covered " > if (Math.floor((minutes <= 9 ? minutes + '0' : minutes) * (1 - (progress/100))) > 0 || !options.readingTime.seconds) {</ span >
593
+ < span class ="cstat-no " title ="statement not covered " > estimate += Math.floor((minutes <= 9 ? minutes + '0' : minutes) * (1 - (progress/100)));</ span >
594
+ < span class ="cstat-no " title ="statement not covered " > estimate += options.readingTime.minutesSuffix;</ span >
595
+ } else < span class ="cstat-no " title ="statement not covered " > if (Math.floor((minutes <= 9 ? minutes + '0' : minutes) * (1 - (progress/100))) === 0 && options.readingTime.seconds) {</ span >
596
+ < span class ="cstat-no " title ="statement not covered " > estimate += Math.round((((minutes <= 9 ? minutes + '0' : minutes)*60) * (1 - (progress/100))) / 10) * options.readingTime.secondInterval;</ span >
597
+ < span class ="cstat-no " title ="statement not covered " > estimate += options.readingTime.secondsSuffix;</ span >
577
598
} else {
578
- < span class ="cstat-no " title ="statement not covered " > estimate += options.readingTime.suffix ;</ span >
599
+ < span class ="cstat-no " title ="statement not covered " > estimate += 0 + options.readingTime.secondsSuffix ;</ span >
579
600
}
580
601
581
602
< span class ="cstat-no " title ="statement not covered " > return estimate;</ span >
606
627
607
628
</ div >
608
629
< div class ="footer ">
609
- < div class ="meta "> Generated by < a href ="http://istanbul-js.org/ " target ="_blank "> istanbul</ a > at Mon Jul 13 2015 15:44:43 GMT+0200 (CEST)</ div >
630
+ < div class ="meta "> Generated by < a href ="http://istanbul-js.org/ " target ="_blank "> istanbul</ a > at Tue Jul 14 2015 10:14:21 GMT+0200 (CEST)</ div >
610
631
</ div >
611
632
< script src ="../prettify.js "> </ script >
612
633
< script >
0 commit comments