2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

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() { _bindResizing() {
this.$(window).on("resize", () => { 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.$("#reply-control").on("div-resizing", () => {
Ember.run.debounce(this, this._positionPicker, 100); Ember.run.throttle(this, this._positionPicker, 50);
}); });
}, },

View file

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