patch(#152): fixes resize issue when using zoom
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Changes
|
||||
|
||||
## 4.3.3
|
||||
* patch: Fixes resize issue when using zoom [#152](https://github.com/wickedest/Mergely/issues/152).
|
||||
|
||||
## 4.3.2
|
||||
* patch: Reset the current change position when [setValue](https://mergely.com/doc##options_callbacks), [clear](https://mergely.com/doc#clear), [lhs](https://mergely.com/doc#lhs) or [rhs](https://mergely.com/doc#rhs) are called.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mergely",
|
||||
"version": "4.3.2",
|
||||
"version": "4.3.3",
|
||||
"description": "A javascript UI for diff/merge",
|
||||
"directories": {
|
||||
"doc": "doc",
|
||||
|
||||
@@ -663,6 +663,8 @@ jQuery.extend(Mgly.CodeMirrorDiffView.prototype, {
|
||||
}
|
||||
},
|
||||
resize: function() {
|
||||
// recalculate line height as it may be zoomed
|
||||
this.em_height = null;
|
||||
this.settings.resize();
|
||||
this._changing(this.id + '-lhs', this.id + '-rhs');
|
||||
this._set_top_offset(this.id + '-lhs');
|
||||
@@ -824,6 +826,7 @@ jQuery.extend(Mgly.CodeMirrorDiffView.prototype, {
|
||||
var sz_timeout1 = null;
|
||||
var sz = function(init) {
|
||||
if (self.settings.resize) self.settings.resize(init);
|
||||
self.resize();
|
||||
self.editor[self.id + '-lhs'].refresh();
|
||||
self.editor[self.id + '-rhs'].refresh();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user