Skip to content

Commit ae28995

Browse files
committed
v3.9.2 release
bugfixes in options dragit/resizeit
1 parent 776fded commit ae28995

File tree

9 files changed

+351
-62
lines changed

9 files changed

+351
-62
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## CHANGELOG
22

3+
### Version 3.9.2
4+
5+
+ **Fixed** issue with **option.dragit** in combination with **option.onwindowresize**
6+
+ **Fixed** issue with options **dragit/resizeit** (panel is now properly fronted when starting a drag or resize operstion or when clicking the header section)
7+
+ **Fixed** issue in optio.resizeit (panel "glued" to mouse in some situations)
8+
9+
---
10+
311
### Version 3.9.1
412

513
+ **Fixed:** When the content section of a jsPanel contains another document complete with DTD, HTML tag etc. the panel sometimes "glued" to the mousecursor after draging/resizing the panel with the built-in **dragit/resizeit** interactions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Build Status](https://travis-ci.org/Flyer53/jsPanel3.svg?branch=master)](https://travis-ci.org/Flyer53/jsPanel3) [![CDNJS](https://img.shields.io/cdnjs/v/jspanel3.svg)](https://cdnjs.com/libraries/jspanel3) ![license MIT](https://img.shields.io/badge/license-MIT-blue.svg) [![npm version](https://badge.fury.io/js/jspanel3.svg)](https://badge.fury.io/js/jspanel3) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/jsPanel/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
22

3-
## [jsPanel 3.9.1 released 2017-06-17](#)
3+
## [jsPanel 3.9.2 released 2017-06-27](#)
44

55

66
**A jQuery plugin to create highly configurable multifunctional floating panels.**

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jspanel3",
3-
"version": "v3.9.1",
3+
"version": "v3.9.2",
44
"description": "A jQuery Plugin to create highly configurable multifunctional floating panels for use in backend solutions and other web applications. Also usable as modal panel, tooltip or hint. With built in support for bootstrap, right-to-left text direction and more ...",
55
"keywords": [
66
"jQuery",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jspanel3",
3-
"version": "3.9.1",
3+
"version": "3.9.2",
44
"description": "A jQuery Plugin to create highly configurable multifunctional floating panels",
55
"dependencies": {
66
"jquery": ">=2.x"

source/jquery.jspanel-compiled.js

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ if (!Object.assign) {
3838
}
3939

4040
var jsPanel = {
41-
version: '3.9.1',
42-
date: '2017-06-14 12:49',
41+
version: '3.9.2',
42+
date: '2017-06-25 22:34',
4343
id: 0, // counter to add to automatically generated id attribute
4444
ziBase: 100, // the lowest z-index a jsPanel may have
4545
zi: 100, // z-index counter, has initially to be the same as ziBase
@@ -1038,7 +1038,6 @@ var jsPanel = {
10381038

10391039
for (var _i = 0; _i < handles.length; _i++) {
10401040
handles[_i].addEventListener(jsPanel.evtStart, function (e) {
1041-
e.stopPropagation();
10421041
var elmtRect = elmt.getBoundingClientRect(),
10431042
/* needs to be calculated on pointerdown!! */
10441043
elmtParentRect = elmtParent.getBoundingClientRect(),
@@ -1213,6 +1212,7 @@ var jsPanel = {
12131212
document.dispatchEvent(dragstop);
12141213
elmt.style.opacity = 1;
12151214
dragstarted = undefined;
1215+
jsPanel.calcPositionFactors(element);
12161216
if (typeof opts.stop === 'function') {
12171217
opts.stop.call(el, el);
12181218
}
@@ -1314,7 +1314,6 @@ var jsPanel = {
13141314
var handles = elmt.getElementsByClassName('jsPanel-resizeit-handle');
13151315
for (var i = 0; i < handles.length; i++) {
13161316
handles[i].addEventListener(jsPanel.evtStart, function (e) {
1317-
e.stopPropagation(); /* prevent elmt from being dragged as well */
13181317
var elmtRect = elmt.getBoundingClientRect(),
13191318
/* needs to be calculated on pointerdown!! */
13201319
elmtParentRect = elmtParent.getBoundingClientRect(),
@@ -1323,15 +1322,11 @@ var jsPanel = {
13231322
elmtParentPosition = elmtParentStyles.getPropertyValue('position'),
13241323
elmtParentLeftBorder = parseInt(elmtParentStyles.getPropertyValue('border-left-width'), 10),
13251324
elmtParentTopBorder = parseInt(elmtParentStyles.getPropertyValue('border-top-width'), 10),
1326-
1327-
//elmtParentRightBorder = parseInt(elmtParentStyles.getPropertyValue('border-right-width'), 10),
1328-
elmtParentBottomBorder = parseInt(elmtParentStyles.getPropertyValue('border-bottom-width'), 10),
1325+
elmtParentBottomBorder = parseInt(elmtParentStyles.getPropertyValue('border-bottom-width'), 10),
13291326
startX = e.pageX || e.touches[0].pageX,
13301327
startY = e.pageY || e.touches[0].pageY,
13311328
scrollLeft = window.scrollX || window.pageXOffset,
13321329
// IE11 doesn't know scrollX
1333-
scrollTop = window.scrollY || window.pageYOffset,
1334-
// IE11 doesn't know scrollY
13351330
startWidth = elmtRect.width,
13361331
startHeight = elmtRect.height,
13371332
startLeft = void 0,
@@ -1629,29 +1624,29 @@ var jsPanel = {
16291624
}
16301625
}
16311626
jsPanel.contentResize(element);
1627+
}
16321628

1633-
document.removeEventListener(jsPanel.evtMove, resizePanel, false);
1634-
if (resizestarted) {
1635-
elmtContent.style.pointerEvents = 'inherit';
1636-
document.dispatchEvent(resizestop);
1637-
resizestarted = undefined;
1638-
// jsPanel specific code ---------------------------------------
1639-
if ((jQuery(elmt).data('status') === 'smallified' || jQuery(elmt).data('status') === 'smallifiedMax') && jQuery(elmt).height() > jQuery(elmt).header.height()) {
1640-
// ... and only when element height changed
1641-
jQuery(elmt).hideControls(['.jsPanel-btn-normalize', '.jsPanel-btn-smallifyrev']);
1642-
jQuery(elmt).data('status', 'normalized');
1643-
jQuery(document).trigger('jspanelnormalized');
1644-
jQuery(document).trigger('jspanelstatuschange');
1645-
}
1646-
jsPanel.calcPositionFactors(element);
1647-
// jsPanel specific code end ------------------------------------
1648-
if (typeof opts.stop === 'function') {
1649-
opts.stop.call(el, el);
1650-
}
1629+
document.removeEventListener(jsPanel.evtMove, resizePanel, false);
1630+
if (resizestarted) {
1631+
elmtContent.style.pointerEvents = 'inherit';
1632+
document.dispatchEvent(resizestop);
1633+
resizestarted = undefined;
1634+
// jsPanel specific code ---------------------------------------
1635+
if ((jQuery(elmt).data('status') === 'smallified' || jQuery(elmt).data('status') === 'smallifiedMax') && jQuery(elmt).height() > jQuery(elmt).header.height()) {
1636+
// ... and only when element height changed
1637+
jQuery(elmt).hideControls(['.jsPanel-btn-normalize', '.jsPanel-btn-smallifyrev']);
1638+
jQuery(elmt).data('status', 'normalized');
1639+
jQuery(document).trigger('jspanelnormalized');
1640+
jQuery(document).trigger('jspanelstatuschange');
1641+
}
1642+
jsPanel.calcPositionFactors(element);
1643+
// jsPanel specific code end ------------------------------------
1644+
if (typeof opts.stop === 'function') {
1645+
opts.stop.call(el, el);
16511646
}
1652-
// reenable window scrolling
1653-
window.removeEventListener(jsPanel.evtEnd, prevDefault, false);
16541647
}
1648+
// reenable window scrolling
1649+
window.removeEventListener(jsPanel.evtEnd, prevDefault, false);
16551650
}, false);
16561651

16571652
return el;
@@ -2419,8 +2414,8 @@ var jsPanel = {
24192414
width: Math.round(elData.width), // width of elt (includes border)
24202415
height: Math.round(elData.height), // height of elt (includes border)
24212416
left: Math.round(elData.left + window.pageXOffset), // left value of elt option.of RELATIVE TO DOCUMENT
2422-
top: Math.round(elData.top + window.pageYOffset) // top value of elt option.of RELATIVE TO DOCUMENT
2423-
};
2417+
top: Math.round(elData.top + window.pageYOffset // top value of elt option.of RELATIVE TO DOCUMENT
2418+
) };
24242419
}
24252420

24262421
if (typeof options === 'string') {

source/jquery.jspanel-compiled.min.js

Lines changed: 144 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/jquery.jspanel.js

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ if (!Object.assign) {
3535
}
3636

3737
var jsPanel = {
38-
version: '3.9.1',
39-
date: '2017-06-14 12:49',
38+
version: '3.9.2',
39+
date: '2017-06-25 22:34',
4040
id: 0, // counter to add to automatically generated id attribute
4141
ziBase: 100, // the lowest z-index a jsPanel may have
4242
zi: 100, // z-index counter, has initially to be the same as ziBase
@@ -1126,7 +1126,6 @@ var jsPanel = {
11261126

11271127
for (let i = 0; i < handles.length; i++) {
11281128
handles[i].addEventListener(jsPanel.evtStart, function (e) {
1129-
e.stopPropagation();
11301129
let elmtRect = elmt.getBoundingClientRect(), /* needs to be calculated on pointerdown!! */
11311130
elmtParentRect = elmtParent.getBoundingClientRect(), /* needs to be calculated on pointerdown!! */
11321131
elmtParentStyles = window.getComputedStyle(elmtParent, null),
@@ -1285,6 +1284,7 @@ var jsPanel = {
12851284
document.dispatchEvent(dragstop);
12861285
elmt.style.opacity = 1;
12871286
dragstarted = undefined;
1287+
jsPanel.calcPositionFactors(element);
12881288
if (typeof opts.stop === 'function') {opts.stop.call(el, el);}
12891289
}
12901290
// reenable window scrolling
@@ -1379,19 +1379,16 @@ var jsPanel = {
13791379
let handles = elmt.getElementsByClassName('jsPanel-resizeit-handle');
13801380
for (let i = 0; i < handles.length; i++) {
13811381
handles[i].addEventListener(jsPanel.evtStart, function(e) {
1382-
e.stopPropagation(); /* prevent elmt from being dragged as well */
13831382
let elmtRect = elmt.getBoundingClientRect(), /* needs to be calculated on pointerdown!! */
13841383
elmtParentRect = elmtParent.getBoundingClientRect(), /* needs to be calculated on pointerdown!! */
13851384
elmtParentStyles = window.getComputedStyle(elmtParent, null),
13861385
elmtParentPosition = elmtParentStyles.getPropertyValue('position'),
13871386
elmtParentLeftBorder = parseInt(elmtParentStyles.getPropertyValue('border-left-width'), 10),
13881387
elmtParentTopBorder = parseInt(elmtParentStyles.getPropertyValue('border-top-width'), 10),
1389-
//elmtParentRightBorder = parseInt(elmtParentStyles.getPropertyValue('border-right-width'), 10),
13901388
elmtParentBottomBorder = parseInt(elmtParentStyles.getPropertyValue('border-bottom-width'), 10),
13911389
startX = e.pageX || e.touches[0].pageX,
13921390
startY = e.pageY || e.touches[0].pageY,
13931391
scrollLeft = window.scrollX || window.pageXOffset, // IE11 doesn't know scrollX
1394-
scrollTop = window.scrollY || window.pageYOffset, // IE11 doesn't know scrollY
13951392
startWidth = elmtRect.width,
13961393
startHeight = elmtRect.height,
13971394
startLeft,
@@ -1619,28 +1616,30 @@ var jsPanel = {
16191616
}
16201617
jsPanel.contentResize(element);
16211618

1622-
document.removeEventListener(jsPanel.evtMove, resizePanel, false);
1623-
if (resizestarted) {
1624-
elmtContent.style.pointerEvents = 'inherit';
1625-
document.dispatchEvent(resizestop);
1626-
resizestarted = undefined;
1627-
// jsPanel specific code ---------------------------------------
1628-
if ((jQuery(elmt).data('status') === 'smallified' || jQuery(elmt).data('status') === 'smallifiedMax') && jQuery(elmt).height() > jQuery(elmt).header.height()) {
1629-
// ... and only when element height changed
1630-
jQuery(elmt).hideControls(['.jsPanel-btn-normalize', '.jsPanel-btn-smallifyrev']);
1631-
jQuery(elmt).data('status', 'normalized');
1632-
jQuery(document).trigger('jspanelnormalized');
1633-
jQuery(document).trigger('jspanelstatuschange');
1634-
}
1635-
jsPanel.calcPositionFactors(element);
1636-
// jsPanel specific code end ------------------------------------
1637-
if (typeof opts.stop === 'function') {
1638-
opts.stop.call(el, el);
1639-
}
1619+
}
1620+
1621+
document.removeEventListener(jsPanel.evtMove, resizePanel, false);
1622+
if (resizestarted) {
1623+
elmtContent.style.pointerEvents = 'inherit';
1624+
document.dispatchEvent(resizestop);
1625+
resizestarted = undefined;
1626+
// jsPanel specific code ---------------------------------------
1627+
if ((jQuery(elmt).data('status') === 'smallified' || jQuery(elmt).data('status') === 'smallifiedMax') && jQuery(elmt).height() > jQuery(elmt).header.height()) {
1628+
// ... and only when element height changed
1629+
jQuery(elmt).hideControls(['.jsPanel-btn-normalize', '.jsPanel-btn-smallifyrev']);
1630+
jQuery(elmt).data('status', 'normalized');
1631+
jQuery(document).trigger('jspanelnormalized');
1632+
jQuery(document).trigger('jspanelstatuschange');
1633+
}
1634+
jsPanel.calcPositionFactors(element);
1635+
// jsPanel specific code end ------------------------------------
1636+
if (typeof opts.stop === 'function') {
1637+
opts.stop.call(el, el);
16401638
}
1641-
// reenable window scrolling
1642-
window.removeEventListener(jsPanel.evtEnd, prevDefault, false);
16431639
}
1640+
// reenable window scrolling
1641+
window.removeEventListener(jsPanel.evtEnd, prevDefault, false);
1642+
16441643
}, false);
16451644

16461645
return el;

source/jquery.jspanel.min.js

Lines changed: 145 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/jquery.jspanel.min.min.css

Whitespace-only changes.

0 commit comments

Comments
 (0)