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:
parent
d2581bbf21
commit
bd0607b15b
2 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
2
vendor/assets/javascripts/div_resizer.js
vendored
2
vendor/assets/javascripts/div_resizer.js
vendored
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue