Skip to content

Commit ef30f42

Browse files
committed
mini notif always slides out to right instead of flip-exit
1 parent 9bfe776 commit ef30f42

File tree

2 files changed

+94
-87
lines changed

2 files changed

+94
-87
lines changed

mixpanel.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3045,8 +3045,7 @@ Globals should be all caps
30453045
var exiting_el = this.showing_video ? this._get_el('video') : this._get_notification_display_el();
30463046
if (this.use_transitions) {
30473047
this._remove_class('bg', 'visible');
3048-
this._remove_class(exiting_el, 'visible');
3049-
this._add_class(exiting_el, 'hidden');
3048+
this._add_class(exiting_el, 'exiting');
30503049
setTimeout(this._remove_notification_el, MPNotif.ANIM_TIME);
30513050
} else {
30523051
var notif_attr, notif_start, notif_goal;
@@ -3507,6 +3506,10 @@ Globals should be all caps
35073506
'opacity': '1.0',
35083507
'top': MPNotif.NOTIF_TOP + 'px'
35093508
},
3509+
'#takeover.exiting': {
3510+
'opacity': '0.0',
3511+
'top': MPNotif.NOTIF_START_TOP + 'px'
3512+
},
35103513
'#thumbspacer': {
35113514
'height': MPNotif.THUMB_OFFSET + 'px'
35123515
},
@@ -3546,12 +3549,16 @@ Globals should be all caps
35463549
'backface-visibility': 'hidden',
35473550
'opacity': '0.0',
35483551
'transform': 'rotateX(90deg)',
3549-
'transition': 'opacity 0.3s, transform 0.3s'
3552+
'transition': 'opacity 0.3s, transform 0.3s, right 0.3s'
35503553
},
35513554
'#mini.visible': {
35523555
'opacity': '1.0',
35533556
'transform': 'rotateX(0deg)'
35543557
},
3558+
'#mini.exiting': {
3559+
'opacity': '0.0',
3560+
'right': '-150px'
3561+
},
35553562
'#mainbox': {
35563563
'border-radius': '4px',
35573564
'box-shadow': shadow,
@@ -3763,7 +3770,7 @@ Globals should be all caps
37633770
'transform': 'translateZ(1px)', // webkit rendering bug http://stackoverflow.com/questions/18167981/clickable-link-area-unexpectedly-smaller-after-css-transform
37643771
'transition': 'opacity ' + anim_seconds + ', top ' + anim_seconds
37653772
},
3766-
'#video.hidden': {
3773+
'#video.exiting': {
37673774
'opacity': '0.0',
37683775
'top': this.video_height + 'px'
37693776
},
@@ -4144,7 +4151,7 @@ Globals should be all caps
41444151
bg.style.height = '100%';
41454152
overlay.style.width = '100%';
41464153

4147-
self._remove_class(self._get_notification_display_el(), 'visible');
4154+
self._add_class(self._get_notification_display_el(), 'exiting');
41484155
self._add_class(bg, 'visible');
41494156

41504157
anims.push({

0 commit comments

Comments
 (0)