FIX: Object.assign is not supported in all browsers
This commit is contained in:
parent
ac6413f456
commit
d7a20c8e93
|
@ -370,7 +370,7 @@ export default Ember.Component.extend({
|
||||||
let windowWidth = this.$(window).width();
|
let windowWidth = this.$(window).width();
|
||||||
|
|
||||||
const desktopModalePositioning = options => {
|
const desktopModalePositioning = options => {
|
||||||
const attributes = {
|
let attributes = {
|
||||||
width: Math.min(windowWidth, 400) - 12,
|
width: Math.min(windowWidth, 400) - 12,
|
||||||
marginLeft: -(Math.min(windowWidth, 400)/2) + 6,
|
marginLeft: -(Math.min(windowWidth, 400)/2) + 6,
|
||||||
marginTop: -130,
|
marginTop: -130,
|
||||||
|
@ -379,14 +379,14 @@ export default Ember.Component.extend({
|
||||||
top: "50%",
|
top: "50%",
|
||||||
display: "flex"
|
display: "flex"
|
||||||
};
|
};
|
||||||
Object.assign(attributes, options);
|
attributes = _.merge(attributes, options);
|
||||||
|
|
||||||
this.$(".emoji-picker-modal").addClass("fadeIn");
|
this.$(".emoji-picker-modal").addClass("fadeIn");
|
||||||
$picker.css(attributes);
|
$picker.css(attributes);
|
||||||
};
|
};
|
||||||
|
|
||||||
const mobilePositioning = options => {
|
const mobilePositioning = options => {
|
||||||
const attributes = {
|
let attributes = {
|
||||||
width: windowWidth - 12,
|
width: windowWidth - 12,
|
||||||
marginLeft: 5,
|
marginLeft: 5,
|
||||||
marginTop: -130,
|
marginTop: -130,
|
||||||
|
@ -395,14 +395,14 @@ export default Ember.Component.extend({
|
||||||
top: "50%",
|
top: "50%",
|
||||||
display: "flex"
|
display: "flex"
|
||||||
};
|
};
|
||||||
Object.assign(attributes, options);
|
attributes = _.merge(attributes, options);
|
||||||
|
|
||||||
this.$(".emoji-picker-modal").addClass("fadeIn");
|
this.$(".emoji-picker-modal").addClass("fadeIn");
|
||||||
$picker.css(attributes);
|
$picker.css(attributes);
|
||||||
};
|
};
|
||||||
|
|
||||||
const desktopPositioning = options => {
|
const desktopPositioning = options => {
|
||||||
const attributes = {
|
let attributes = {
|
||||||
width: windowWidth < 485 ? windowWidth - 12 : 400,
|
width: windowWidth < 485 ? windowWidth - 12 : 400,
|
||||||
marginLeft: "",
|
marginLeft: "",
|
||||||
marginTop: "",
|
marginTop: "",
|
||||||
|
@ -413,7 +413,7 @@ export default Ember.Component.extend({
|
||||||
display:
|
display:
|
||||||
"flex"
|
"flex"
|
||||||
};
|
};
|
||||||
Object.assign(attributes, options);
|
attributes = _.merge(attributes, options);
|
||||||
|
|
||||||
this.$(".emoji-picker-modal").removeClass("fadeIn");
|
this.$(".emoji-picker-modal").removeClass("fadeIn");
|
||||||
$picker.css(attributes);
|
$picker.css(attributes);
|
||||||
|
|
Loading…
Reference in New Issue