Skip to content

Commit fa14049

Browse files
committed
v4.13.0 release
1 parent c3f64aa commit fa14049

27 files changed

+137
-104
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## <span style='color:#563D7C;'>CHANGELOG</span>
22

3+
### <span style='color:#563D7C;'>Version 4.13.0 *2021-11-24*</span>
4+
5+
+ enabled default use of the PointerEvent API
6+
+ **added** method `jsPanel.usePointerEvents()` to disable/enable use of PointerEvent API
7+
38
### <span style='color:#563D7C;'>Version 4.12.0 *2021-07-09*</span>
49

510
+ updated CSS files to **bugfix** a minor issue in `option.minimizeTo`

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<img alt="NPM license" src="https://img.shields.io/npm/l/jspanel4"> <img alt="npm version" src="https://img.shields.io/npm/v/jspanel4?color=0677b8"> <img alt="npm downloads" src="https://img.shields.io/npm/dm/jspanel4?color=0677b8">
22

33

4-
## [jsPanel 4.12.0 released 2021-07-09](#)
4+
## [jsPanel 4.13.0 released 2021-11-24](#)
55

6-
> As of v4.11.0-beta methods `jsPanel.ajax()` and `jsPanel.fetch()` are updated. That also affects options `contentAjax` and `contentFetch`. These updates might break existing code. So please check the docs for this beta release on https://jspanel.de/
6+
> As of v4.11.0-beta methods `jsPanel.ajax()` and `jsPanel.fetch()` are updated. That also affects options `contentAjax` and `contentFetch`. These updates might break existing code. So please check the docs on https://jspanel.de/
77
88
<img src="https://res.cloudinary.com/stefanstraesser-eu/image/upload/v1558601426/jsPanel4.7.0-sample-panels-1920_yzobd9.jpg">
99

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jspanel4x",
3-
"version": "4.12.0",
3+
"version": "4.13.0",
44
"authors": [
55
"Stefan Straesser <[email protected]> (http://jspanel.de/)"
66
],

dist/extensions/contextmenu/jspanel.contextmenu.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/extensions/datepicker/jspanel.datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/extensions/datepicker/theme/default.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/extensions/dock/jspanel.dock.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/extensions/hint/jspanel.hint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/extensions/layout/jspanel.layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/extensions/modal/jspanel.modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/extensions/tooltip/jspanel.tooltip.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/jspanel.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

dist/jspanel.js

+65-55
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]
@@ -26,8 +26,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
2626
// noinspection JSVoidFunctionReturnValueUsed
2727
// eslint-disable-next-line no-redeclare
2828
var jsPanel = {
29-
version: '4.12.0',
30-
date: '2021-07-09 09:15',
29+
version: '4.13.0',
30+
date: '2021-11-24 11:58',
3131
ajaxAlwaysCallbacks: [],
3232
autopositionSpacing: 4,
3333
closeOnEscape: function () {
@@ -109,12 +109,9 @@ var jsPanel = {
109109
isIE: function () {
110110
return navigator.appVersion.match(/Trident/);
111111
}(),
112-
// pointerdown: 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'],
113-
// pointermove: 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'],
114-
// pointerup: 'onpointerup' in window ? ['pointerup'] : 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'],
115-
pointerdown: 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'],
116-
pointermove: 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'],
117-
pointerup: 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'],
112+
pointerdown: 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'],
113+
pointermove: 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'],
114+
pointerup: 'onpointerup' in window ? ['pointerup'] : 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'],
118115
polyfills: function () {
119116
// Polyfills for IE11 only
120117
// Object.assign polyfill - https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
@@ -751,6 +748,19 @@ var jsPanel = {
751748
jsPanel.modifier = false;
752749
});
753750
}(),
751+
usePointerEvents: function usePointerEvents() {
752+
var use = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
753+
754+
if (!use) {
755+
this.pointerdown = 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'];
756+
this.pointermove = 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'];
757+
this.pointerup = 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'];
758+
} else {
759+
this.pointerdown = 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'];
760+
this.pointermove = 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'];
761+
this.pointerup = 'onpointerup' in window ? ['pointerup'] : 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'];
762+
}
763+
},
754764
// color methods ---------------
755765
color: function color(val) {
756766
var color = val.toLowerCase(),
@@ -809,52 +819,52 @@ var jsPanel = {
809819
result.rgb.css = "rgb(".concat(result.rgb.r, ",").concat(result.rgb.g, ",").concat(result.rgb.b, ")");
810820
} // check val for rgb/rgba color
811821
else if (color.match(RGBAPattern)) {
812-
match = RGBAPattern.exec(color);
813-
result.rgb = {
814-
css: color,
815-
r: match[1],
816-
g: match[2],
817-
b: match[3]
818-
};
819-
result.hex = this.rgbToHex(match[1], match[2], match[3]);
820-
hsl = this.rgbToHsl(match[1], match[2], match[3]);
821-
result.hsl = hsl;
822-
} // check val for hsl/hsla color
823-
else if (color.match(HSLAPattern)) {
824-
match = HSLAPattern.exec(color);
825-
h = match[1] / 360;
826-
s = match[2].substr(0, match[2].length - 1) / 100;
827-
l = match[3].substr(0, match[3].length - 1) / 100;
828-
channels = this.hslToRgb(h, s, l);
829-
result.rgb = {
830-
css: "rgb(".concat(channels[0], ",").concat(channels[1], ",").concat(channels[2], ")"),
831-
r: channels[0],
832-
g: channels[1],
833-
b: channels[2]
834-
};
835-
result.hex = this.rgbToHex(result.rgb.r, result.rgb.g, result.rgb.b);
836-
result.hsl = {
837-
css: "hsl(".concat(match[1], ",").concat(match[2], ",").concat(match[3], ")"),
838-
h: match[1],
839-
s: match[2],
840-
l: match[3]
841-
};
842-
} // or return #f5f5f5
843-
else {
844-
result.hex = '#f5f5f5';
845-
result.rgb = {
846-
css: 'rgb(245,245,245)',
847-
r: 245,
848-
g: 245,
849-
b: 245
850-
};
851-
result.hsl = {
852-
css: 'hsl(0,0%,96%)',
853-
h: 0,
854-
s: '0%',
855-
l: '96%'
856-
};
857-
}
822+
match = RGBAPattern.exec(color);
823+
result.rgb = {
824+
css: color,
825+
r: match[1],
826+
g: match[2],
827+
b: match[3]
828+
};
829+
result.hex = this.rgbToHex(match[1], match[2], match[3]);
830+
hsl = this.rgbToHsl(match[1], match[2], match[3]);
831+
result.hsl = hsl;
832+
} // check val for hsl/hsla color
833+
else if (color.match(HSLAPattern)) {
834+
match = HSLAPattern.exec(color);
835+
h = match[1] / 360;
836+
s = match[2].substr(0, match[2].length - 1) / 100;
837+
l = match[3].substr(0, match[3].length - 1) / 100;
838+
channels = this.hslToRgb(h, s, l);
839+
result.rgb = {
840+
css: "rgb(".concat(channels[0], ",").concat(channels[1], ",").concat(channels[2], ")"),
841+
r: channels[0],
842+
g: channels[1],
843+
b: channels[2]
844+
};
845+
result.hex = this.rgbToHex(result.rgb.r, result.rgb.g, result.rgb.b);
846+
result.hsl = {
847+
css: "hsl(".concat(match[1], ",").concat(match[2], ",").concat(match[3], ")"),
848+
h: match[1],
849+
s: match[2],
850+
l: match[3]
851+
};
852+
} // or return #f5f5f5
853+
else {
854+
result.hex = '#f5f5f5';
855+
result.rgb = {
856+
css: 'rgb(245,245,245)',
857+
r: 245,
858+
g: 245,
859+
b: 245
860+
};
861+
result.hsl = {
862+
css: 'hsl(0,0%,96%)',
863+
h: 0,
864+
s: '0%',
865+
l: '96%'
866+
};
867+
}
858868

859869
return result;
860870
},

dist/jspanel.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

es6module/extensions/contextmenu/jspanel.contextmenu.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/extensions/datepicker/jspanel.datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/extensions/datepicker/theme/default.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/extensions/dock/jspanel.dock.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/extensions/hint/jspanel.hint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/extensions/layout/jspanel.layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/extensions/modal/jspanel.modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/extensions/tooltip/jspanel.tooltip.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/jspanel.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]

es6module/jspanel.js

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu
3-
* @version v4.12.0
3+
* @version v4.13.0
44
* @homepage https://jspanel.de/
55
* @license MIT
66
* @author Stefan Sträßer - [email protected]
@@ -11,8 +11,8 @@ export // eslint-disable-next-line no-redeclare
1111
// noinspection JSVoidFunctionReturnValueUsed
1212
// eslint-disable-next-line no-redeclare
1313
let jsPanel = {
14-
version: '4.12.0',
15-
date: '2021-07-09 09:15',
14+
version: '4.13.0',
15+
date: '2021-11-24 11:58',
1616
ajaxAlwaysCallbacks: [],
1717
autopositionSpacing: 4,
1818
closeOnEscape: (() => {
@@ -85,12 +85,9 @@ let jsPanel = {
8585
isIE: (() => {
8686
return navigator.appVersion.match(/Trident/);
8787
})(),
88-
// pointerdown: 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'],
89-
// pointermove: 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'],
90-
// pointerup: 'onpointerup' in window ? ['pointerup'] : 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'],
91-
pointerdown: 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'],
92-
pointermove: 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'],
93-
pointerup: 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'],
88+
pointerdown: 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'],
89+
pointermove: 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'],
90+
pointerup: 'onpointerup' in window ? ['pointerup'] : 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'],
9491
polyfills: (() => {
9592
// Polyfills for IE11 only
9693
// Object.assign polyfill - https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
@@ -703,6 +700,18 @@ let jsPanel = {
703700
});
704701
})(),
705702

703+
usePointerEvents(use = true) {
704+
if (!use) {
705+
this.pointerdown = 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'];
706+
this.pointermove = 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'];
707+
this.pointerup = 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'];
708+
} else {
709+
this.pointerdown = 'onpointerdown' in window ? ['pointerdown'] : 'ontouchend' in window ? ['touchstart', 'mousedown'] : ['mousedown'];
710+
this.pointermove = 'onpointermove' in window ? ['pointermove'] : 'ontouchend' in window ? ['touchmove', 'mousemove'] : ['mousemove'];
711+
this.pointerup = 'onpointerup' in window ? ['pointerup'] : 'ontouchend' in window ? ['touchend', 'mouseup'] : ['mouseup'];
712+
}
713+
},
714+
706715
// color methods ---------------
707716
color(val) {
708717
let color = val.toLowerCase(),

es6module/jspanel.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)