Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65c71be17e | ||
|
|
b9e3641c85 |
@@ -1,3 +1,10 @@
|
|||||||
|
# [5.2.0](https://github.com/wickedest/Mergely/compare/v5.1.4...v5.2.0) (2024-06-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Allows height to be not explicit height, e.g. 'inherit' or '100%' ([#196](https://github.com/wickedest/Mergely/issues/196)) ([b9e3641](https://github.com/wickedest/Mergely/commit/b9e3641c852a8926db5efdf33e65a607d5f2df5e))
|
||||||
|
|
||||||
## [5.1.4](https://github.com/wickedest/Mergely/compare/v5.1.3...v5.1.4) (2024-05-17)
|
## [5.1.4](https://github.com/wickedest/Mergely/compare/v5.1.3...v5.1.4) (2024-05-17)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mergely",
|
"name": "mergely",
|
||||||
"version": "5.1.4",
|
"version": "5.2.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mergely",
|
"name": "mergely",
|
||||||
"version": "5.1.4",
|
"version": "5.2.0",
|
||||||
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.1.6",
|
"@babel/core": "^7.1.6",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mergely",
|
"name": "mergely",
|
||||||
"version": "5.1.4",
|
"version": "5.2.0",
|
||||||
"description": "A javascript UI for diff/merge",
|
"description": "A javascript UI for diff/merge",
|
||||||
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ CodeMirrorDiffView.prototype.unbind = function() {
|
|||||||
this.el.removeChild(this.el.lastChild);
|
this.el.removeChild(this.el.lastChild);
|
||||||
}
|
}
|
||||||
if (this._origEl) {
|
if (this._origEl) {
|
||||||
this.el.style = this._origEl.style;
|
|
||||||
this.el.className = this._origEl.className;
|
this.el.className = this._origEl.className;
|
||||||
}
|
}
|
||||||
this._unbound = true;
|
this._unbound = true;
|
||||||
@@ -257,16 +256,17 @@ CodeMirrorDiffView.prototype.resize = function() {
|
|||||||
|
|
||||||
CodeMirrorDiffView.prototype.bind = function(container) {
|
CodeMirrorDiffView.prototype.bind = function(container) {
|
||||||
this.trace('api#bind', container);
|
this.trace('api#bind', container);
|
||||||
this._origEl = {
|
|
||||||
style: container.style,
|
|
||||||
className: container.className
|
|
||||||
};
|
|
||||||
const el = dom.getMergelyContainer({ clazz: container.className });
|
const el = dom.getMergelyContainer({ clazz: container.className });
|
||||||
const computedStyle = window.getComputedStyle(container);
|
const computedStyle = window.getComputedStyle(container);
|
||||||
if (!computedStyle.height || computedStyle.height === '0px') {
|
if (!el.style.height
|
||||||
|
&& (!computedStyle.height || computedStyle.height === '0px')
|
||||||
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The element "${container.id}" requires an explicit height`);
|
`The element "${container.id}" requires an explicit height`);
|
||||||
}
|
}
|
||||||
|
this._origEl = {
|
||||||
|
className: container.className
|
||||||
|
};
|
||||||
this.id = `${container.id}`;
|
this.id = `${container.id}`;
|
||||||
this.lhsId = `${container.id}-lhs`;
|
this.lhsId = `${container.id}-lhs`;
|
||||||
this.rhsId = `${container.id}-rhs`;
|
this.rhsId = `${container.id}-rhs`;
|
||||||
@@ -753,6 +753,9 @@ CodeMirrorDiffView.prototype._set_top_offset = function (side) {
|
|||||||
// this is the distance from the top of the screen to the top of the
|
// this is the distance from the top of the screen to the top of the
|
||||||
// content of the first codemirror editor
|
// content of the first codemirror editor
|
||||||
const topnode = this._queryElement('.CodeMirror-measure');
|
const topnode = this._queryElement('.CodeMirror-measure');
|
||||||
|
if (!topnode.offsetParent) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const top_offset = topnode.offsetParent.offsetTop + 4;
|
const top_offset = topnode.offsetParent.offsetTop + 4;
|
||||||
|
|
||||||
// restore editor's scroll position
|
// restore editor's scroll position
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ class Mergely {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const computedStyle = window.getComputedStyle(element);
|
const computedStyle = window.getComputedStyle(element);
|
||||||
if (!computedStyle.height || computedStyle.height === '0px') {
|
if (!element.style.height
|
||||||
|
&& (!computedStyle.height || computedStyle.height === '0px')
|
||||||
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The element "${selector}" requires an explicit height`);
|
`The element "${selector}" requires an explicit height`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ module.exports = (mode) => {
|
|||||||
...webpackDevConfig.output,
|
...webpackDevConfig.output,
|
||||||
path: path.join(__dirname, 'lib'),
|
path: path.join(__dirname, 'lib'),
|
||||||
filename: './[name].js',
|
filename: './[name].js',
|
||||||
|
library: {
|
||||||
|
name: 'mergely',
|
||||||
|
type: 'umd',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user