Viczei / ng2-swipe-cards

A kit of cards (including tinder-card) for angular2
MIT License
25 stars 18 forks source link

Calc function doesn't calc anything #29

Closed chrillewoodz closed 7 years ago

chrillewoodz commented 7 years ago

I noticed these two lines in the initOverlay function, and it seems that you're using calc that doesn't calc anything. From experience I noticed that calc doesn't work in some cases, especially Safari. Which could cause the width and height to break. Is there any reason to why you use calc here? If not you should consider removing it to minimise the risk of it breaking cross browser.

this.renderer.setElementStyle(this.overlayElement, "width", "calc(100%)");
this.renderer.setElementStyle(this.overlayElement, "height", "calc(100%)");
Viczei commented 7 years ago

You are right, the calc seems not necessary here. i'm removing it.