gajus / swing

A swipeable cards interface. The swipe-left/swipe-right for yes/no input. As seen in apps like Jelly and Tinder.
Other
2.63k stars 247 forks source link

Fix: change global to window since global does not exists in browsers. #121

Closed Jule- closed 4 years ago

Jule- commented 6 years ago

I think you work with some specific builder that understand global and probably transpile it for browser but for others please use window which seems to be the only available in browsers.

Thanks for your work! ;)

gajus commented 6 years ago

What builder are you using?

Jule- commented 6 years ago

I am using aurelia bundler.

Jule- commented 6 years ago

Hum, seems that my changes broke one of your tests in your test env... But on my side:

$ mocha --compilers js:babel-register

  DOM
    Stack
      .getCard()
        √ returns card associated with an element
        √ returns null when element is not associated with a card
      .destroyCard()
        √ is called when Card is destroyed
      .getConfig()
        √ returns the config object
        isThrowOut
          √ is invoked in the event of dragend
          √ determines throwOut event
          √ determines throwOut event
        throwOutConfidence
          √ is invoked in the event of dragmove
        rotation
          √ is invoked in the event of dragmove
        transform
          √ is invoked in the event of dragmove (43ms)

  10 passing (425ms)

Done in 2.17s.
Jule- commented 6 years ago

Hi, any news on this? Thanks.