makes emoji-picker position more dynamic

This commit is contained in:
Joffrey JAFFEUX 2017-07-19 22:14:41 +02:00
parent d2581bbf21
commit bd0607b15b
2 changed files with 5 additions and 3 deletions

View File

@ -220,11 +220,11 @@ export default Ember.Component.extend({
_bindResizing() {
this.$(window).on("resize", () => {
Ember.run.debounce(this, this._positionPicker, 100);
Ember.run.throttle(this, this._positionPicker, 50);
});
Ember.$("#reply-control").on("div-resized", () => {
Ember.run.debounce(this, this._positionPicker, 100);
Ember.$("#reply-control").on("div-resizing", () => {
Ember.run.throttle(this, this._positionPicker, 50);
});
},

View File

@ -38,6 +38,8 @@ startDrag = function(e, opts) {
};
performDrag = function(e, opts) {
$(div).trigger("div-resizing");
var size, sizePx, thisMousePos;
thisMousePos = mousePosition(e).y;
size = originalDivHeight + (originalPos - thisMousePos);