Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9bc901dd2 | ||
|
|
b49c9ce40f |
@@ -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.
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ Unpack mergely.tgz into a folder, for example, `./lib`, and add the following to
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/codemirror.min.js"></script>
|
||||
<link rel="stylesheet" media="all" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/codemirror.css" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/addon/search/searchcursor.min.js"></script>
|
||||
<script src="lib/mergely/lib/mergely.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="lib/mergely/lib/mergely.css" />
|
||||
<script src="package/lib/mergely.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" media="all" href="package/lib/mergely.css" />
|
||||
```
|
||||
|
||||
Create a div for the editor in `<body>`.
|
||||
|
||||
@@ -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