Ver código fonte

dts lint fixes

Adam Shaw 7 anos atrás
pai
commit
897d622527

+ 1 - 1
src/common/Popover.ts

@@ -19,7 +19,7 @@ import { computeClippingRect, computeRect } from '../util/dom-geom'
 
 
 export interface PopoverOptions {
 export interface PopoverOptions {
   className?: string
   className?: string
-  content?: (HTMLElement) => void
+  content?: (el: HTMLElement) => void
   parentEl: HTMLElement
   parentEl: HTMLElement
   autoHide?: boolean
   autoHide?: boolean
   top?: number
   top?: number

+ 1 - 1
src/component/DateComponent.ts

@@ -217,7 +217,7 @@ export default abstract class DateComponent extends Component {
   }
   }
 
 
 
 
-  queryHit(leftOffset, topOffset): Hit {
+  queryHit(leftOffset, topOffset): Hit | null {
     return null // this should be abstract
     return null // this should be abstract
   }
   }
 
 

+ 10 - 8
tests/automated/legacy/event-dnd.js

@@ -36,12 +36,14 @@ describe('eventDrop', function() {
 
 
             init(
             init(
               function() {
               function() {
-                $('.fc-event').simulate('drag', {
-                  dx: $('.fc-day').width() * 2,
-                  dy: $('.fc-day').height(),
-                  isTouch: isTouch,
-                  delay: isTouch ? 200 : 0
-                })
+                setTimeout(function() {
+                  $('.fc-event').simulate('drag', {
+                    dx: $('.fc-day').width() * 2,
+                    dy: $('.fc-day').height(),
+                    isTouch: isTouch,
+                    delay: isTouch ? 200 : 0
+                  })
+                }, 0)
               },
               },
               function(arg) {
               function(arg) {
                 var delta = FullCalendar.createDuration({ day: 9 })
                 var delta = FullCalendar.createDuration({ day: 9 })
@@ -168,9 +170,9 @@ describe('eventDrop', function() {
                     dx: $('th.fc-wed').width(), // 1 day
                     dx: $('th.fc-wed').width(), // 1 day
                     dy: $('.fc-slats tr:eq(1)').outerHeight() * 2.9, // 1.5 hours
                     dy: $('.fc-slats tr:eq(1)').outerHeight() * 2.9, // 1.5 hours
                     isTouch: isTouch,
                     isTouch: isTouch,
-                    delay: isTouch ? 200 : 0
+                    delay: isTouch ? 200 : 0 // delay for FF
                   })
                   })
-                }, 0)
+                }, 100) // delay for FF
               },
               },
               function(arg) {
               function(arg) {
                 var delta = FullCalendar.createDuration({ day: 1, hour: 1, minute: 30 })
                 var delta = FullCalendar.createDuration({ day: 1, hour: 1, minute: 30 })

+ 3 - 3
tests/automated/legacy/event-resize.js

@@ -199,15 +199,15 @@ describe('eventResize', function() {
                 localPoint: { left: '50%', top: '90%' },
                 localPoint: { left: '50%', top: '90%' },
                 delay: 200,
                 delay: 200,
                 onRelease: function() {
                 onRelease: function() {
-                  setTimeout(function() { // for FF
+                  setTimeout(function() {
                     $('.fc-event .fc-resizer').simulate('drag', {
                     $('.fc-event .fc-resizer').simulate('drag', {
                       dy: $('.fc-slats tr:eq(1)').height() * 4.5, // 5 slots, so 2.5 hours
                       dy: $('.fc-slats tr:eq(1)').height() * 4.5, // 5 slots, so 2.5 hours
                       isTouch: true,
                       isTouch: true,
                     })
                     })
-                  }, 0)
+                  }, 100) // delay for FF
                 }
                 }
               })
               })
-            }, 0)
+            }, 100) // delay for FF
           },
           },
           function(arg) {
           function(arg) {
             expect(arg.endDelta).toEqual(FullCalendar.createDuration({ hour: 2, minute: 30 }))
             expect(arg.endDelta).toEqual(FullCalendar.createDuration({ hour: 2, minute: 30 }))

+ 12 - 10
tests/automated/legacy/select-callback.js

@@ -59,15 +59,17 @@ describe('select callback', function() {
           }
           }
           spyOn(options, 'select').and.callThrough()
           spyOn(options, 'select').and.callThrough()
           initCalendar(options)
           initCalendar(options)
-          $('.fc-day[data-date="2014-04-28"]').simulate('drag', {
-            isTouch: true,
-            delay: 200,
-            end: '.fc-day[data-date="2014-05-06"]',
-            callback: function() {
-              expect(options.select).toHaveBeenCalled()
-              done()
-            }
-          })
+          setTimeout(function() {
+            $('.fc-day[data-date="2014-04-28"]').simulate('drag', {
+              isTouch: true,
+              delay: 200,
+              end: '.fc-day[data-date="2014-05-06"]',
+              callback: function() {
+                expect(options.select).toHaveBeenCalled()
+                done()
+              }
+            })
+          }, 100) // for FF
         })
         })
         it('gets fired correctly when the user selects just one cell', function(done) {
         it('gets fired correctly when the user selects just one cell', function(done) {
           options.select = function(arg) {
           options.select = function(arg) {
@@ -189,7 +191,7 @@ describe('select callback', function() {
                   done()
                   done()
                 }
                 }
               })
               })
-            }, 0)
+            }, 100) // for FF
           })
           })
           it('gets fired correctly when the user selects slots in a different day', function(done) {
           it('gets fired correctly when the user selects slots in a different day', function(done) {
             options.select = function(arg) {
             options.select = function(arg) {