-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jsPanel v 4.11.2 release
- Loading branch information
Showing
27 changed files
with
292 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "jspanel4x", | ||
"version": "4.11.1", | ||
"version": "4.11.2", | ||
"authors": [ | ||
"Stefan Straesser <[email protected]> (http://jspanel.de/)" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
@@ -24,8 +24,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi | |
|
||
// eslint-disable-next-line no-redeclare | ||
var jsPanel = { | ||
version: '4.11.1', | ||
date: '2020-11-23 09:37', | ||
version: '4.11.2', | ||
date: '2020-12-09 10:10', | ||
ajaxAlwaysCallbacks: [], | ||
autopositionSpacing: 4, | ||
closeOnEscape: function () { | ||
|
@@ -3246,6 +3246,101 @@ var jsPanel = { | |
|
||
var handles = options.handles || jsPanel.defaults.dragit.handles; | ||
var cursor = options.cursor || jsPanel.defaults.dragit.cursor; | ||
|
||
function pointerUpHandler(e, event) { | ||
jsPanel.pointermove.forEach(function (e) { | ||
document.removeEventListener(e, dragElmt); | ||
}); | ||
jsPanel.removeSnapAreas(); | ||
|
||
if (dragstarted) { | ||
self.style.opacity = 1; | ||
dragstarted = undefined; | ||
|
||
if (opts.snap) { | ||
switch (self.snappableTo) { | ||
case 'left-top': | ||
self.snap(opts.snap.snapLeftTop); | ||
break; | ||
|
||
case 'center-top': | ||
self.snap(opts.snap.snapCenterTop); | ||
break; | ||
|
||
case 'right-top': | ||
self.snap(opts.snap.snapRightTop); | ||
break; | ||
|
||
case 'right-center': | ||
self.snap(opts.snap.snapRightCenter); | ||
break; | ||
|
||
case 'right-bottom': | ||
self.snap(opts.snap.snapRightBottom); | ||
break; | ||
|
||
case 'center-bottom': | ||
self.snap(opts.snap.snapCenterBottom); | ||
break; | ||
|
||
case 'left-bottom': | ||
self.snap(opts.snap.snapLeftBottom); | ||
break; | ||
|
||
case 'left-center': | ||
self.snap(opts.snap.snapLeftCenter); | ||
break; | ||
} | ||
|
||
if (opts.snap.callback && self.snappableTo && typeof opts.snap.callback === 'function') { | ||
opts.snap.callback.call(self, self); | ||
|
||
if (opts.snap.repositionOnSnap && opts.snap[camelcase(self.snappableTo)] !== false) { | ||
self.repositionOnSnap(self.snappableTo); | ||
} | ||
} | ||
|
||
if (self.snappableTo && opts.snap.repositionOnSnap && opts.snap[camelcase(self.snappableTo)]) { | ||
self.repositionOnSnap(self.snappableTo); | ||
} | ||
} // opts.drop | ||
|
||
|
||
if (self.droppableTo && self.droppableTo) { | ||
var sourceContainer = self.parentElement; | ||
self.move(self.droppableTo); | ||
|
||
if (opts.drop.callback) { | ||
opts.drop.callback.call(self, self, self.droppableTo, sourceContainer); | ||
} | ||
} | ||
|
||
document.dispatchEvent(jspaneldragstop); | ||
|
||
if (opts.stop.length) { | ||
var stopStyles = window.getComputedStyle(self), | ||
paneldata = { | ||
left: parseFloat(stopStyles.left), | ||
top: parseFloat(stopStyles.top), | ||
width: parseFloat(stopStyles.width), | ||
height: parseFloat(stopStyles.height) | ||
}; | ||
jsPanel.processCallbacks(self, opts.stop, false, paneldata, e); | ||
} | ||
|
||
self.saveCurrentPosition(); | ||
self.calcSizeFactors(); // important for options onwindowresize/onparentresize | ||
} | ||
|
||
self.controlbar.style.pointerEvents = 'inherit'; | ||
self.content.style.pointerEvents = 'inherit'; // restore other panel's css pointer-events | ||
|
||
document.querySelectorAll('iframe').forEach(function (frame) { | ||
frame.style.pointerEvents = 'auto'; | ||
}); | ||
document.removeEventListener(event, pointerUpHandler); | ||
} | ||
|
||
self.querySelectorAll(handles).forEach(function (handle) { | ||
handle.style.touchAction = 'none'; | ||
handle.style.cursor = cursor; | ||
|
@@ -3680,101 +3775,7 @@ var jsPanel = { | |
}); | ||
}); | ||
jsPanel.pointerup.forEach(function (event) { | ||
document.addEventListener(event, function (e) { | ||
jsPanel.pointermove.forEach(function (e) { | ||
document.removeEventListener(e, dragElmt); | ||
}); //document.body.style.overflow = 'inherit'; | ||
|
||
jsPanel.removeSnapAreas(); | ||
|
||
if (dragstarted) { | ||
self.style.opacity = 1; | ||
dragstarted = undefined; | ||
|
||
if (opts.snap) { | ||
switch (self.snappableTo) { | ||
case 'left-top': | ||
self.snap(opts.snap.snapLeftTop); | ||
break; | ||
|
||
case 'center-top': | ||
self.snap(opts.snap.snapCenterTop); | ||
break; | ||
|
||
case 'right-top': | ||
self.snap(opts.snap.snapRightTop); | ||
break; | ||
|
||
case 'right-center': | ||
self.snap(opts.snap.snapRightCenter); | ||
break; | ||
|
||
case 'right-bottom': | ||
self.snap(opts.snap.snapRightBottom); | ||
break; | ||
|
||
case 'center-bottom': | ||
self.snap(opts.snap.snapCenterBottom); | ||
break; | ||
|
||
case 'left-bottom': | ||
self.snap(opts.snap.snapLeftBottom); | ||
break; | ||
|
||
case 'left-center': | ||
self.snap(opts.snap.snapLeftCenter); | ||
break; | ||
} | ||
|
||
if (opts.snap.callback && self.snappableTo && typeof opts.snap.callback === 'function') { | ||
opts.snap.callback.call(self, self); | ||
|
||
if (opts.snap.repositionOnSnap && opts.snap[camelcase(self.snappableTo)] !== false) { | ||
self.repositionOnSnap(self.snappableTo); | ||
} | ||
} | ||
|
||
if (self.snappableTo && opts.snap.repositionOnSnap && opts.snap[camelcase(self.snappableTo)]) { | ||
self.repositionOnSnap(self.snappableTo); | ||
} | ||
} // opts.drop | ||
|
||
|
||
if (self.droppableTo && self.droppableTo | ||
/* !== elmt.parentElement*/ | ||
) { | ||
var sourceContainer = self.parentElement; | ||
self.move(self.droppableTo); | ||
|
||
if (opts.drop.callback) { | ||
opts.drop.callback.call(self, self, self.droppableTo, sourceContainer); | ||
} | ||
} | ||
|
||
document.dispatchEvent(jspaneldragstop); | ||
|
||
if (opts.stop.length) { | ||
var stopStyles = window.getComputedStyle(self), | ||
paneldata = { | ||
left: parseFloat(stopStyles.left), | ||
top: parseFloat(stopStyles.top), | ||
width: parseFloat(stopStyles.width), | ||
height: parseFloat(stopStyles.height) | ||
}; | ||
jsPanel.processCallbacks(self, opts.stop, false, paneldata, e); | ||
} | ||
|
||
self.saveCurrentPosition(); | ||
self.calcSizeFactors(); // important for options onwindowresize/onparentresize | ||
} | ||
|
||
self.controlbar.style.pointerEvents = 'inherit'; | ||
self.content.style.pointerEvents = 'inherit'; // restore other panel's css pointer-events | ||
|
||
document.querySelectorAll('iframe').forEach(function (frame) { | ||
frame.style.pointerEvents = 'auto'; | ||
}); | ||
}); | ||
document.addEventListener(event, pointerUpHandler); | ||
window.removeEventListener('mouseout', windowListener); | ||
}); // dragit is initialized - now disable if set | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* jsPanel - A JavaScript library to create highly configurable multifunctional floating panels that can also be used as modal, tooltip, hint or contextmenu | ||
* @version v4.11.1 | ||
* @version v4.11.2 | ||
* @homepage https://jspanel.de/ | ||
* @license MIT | ||
* @author Stefan Sträßer - [email protected] | ||
|
Oops, something went wrong.