Skip to content

Commit

Permalink
Updated CB_Mouse preventing deprecated Pointer events usage and updat…
Browse files Browse the repository at this point in the history
…ed web site / examples
  • Loading branch information
jalbam committed Jan 16, 2024
1 parent 195d124 commit deec958
Show file tree
Hide file tree
Showing 389 changed files with 920 additions and 693 deletions.
30 changes: 22 additions & 8 deletions CrossBrowdy/CrossBase/input/CB_Mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,19 @@ var CB_Mouse = function() { return CB_Mouse; };
function(e)
{
e = CB_Mouse.normalizeEvent(e);
//Uses setCapture/releaseCapture to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//Uses setPointerCapture/releasePointerCapture (setCapture/releaseCapture) to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//if (typeof(document.body) !== "undefined" && typeof(document.body.setCapture) !== "undefined")
if (typeof(e.target) !== "undefined" && typeof(e.target.setCapture) !== "undefined")
if (typeof(e.target) !== "undefined")
{
//document.body.setCapture();
e.target.setCapture();
if (typeof(e.target.setPointerCapture) !== "undefined")
{
e.target.setPointerCapture(e.pointerId);
}
else if (typeof(e.target.setCapture) !== "undefined")
{
//document.body.setCapture();
e.target.setCapture();
}
}
CB_Mouse._updateButtonsDown(e, true);
},
Expand All @@ -80,12 +87,19 @@ var CB_Mouse = function() { return CB_Mouse; };
function(e)
{
e = CB_Mouse.normalizeEvent(e);
//Uses setCapture/releaseCapture to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//Uses setPointerCapture/releasePointerCapture (setCapture/releaseCapture) to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//if (typeof(document.body) !== "undefined" && typeof(document.body.releaseCapture) !== "undefined")
if (typeof(e.target) !== "undefined" && typeof(e.target.releaseCapture) !== "undefined")
if (typeof(e.target) !== "undefined")
{
//document.body.releaseCapture();
e.target.releaseCapture();
if (typeof(e.target.releasePointerCapture) !== "undefined")
{
e.target.releasePointerCapture(e.pointerId);
}
else if (typeof(e.target.releaseCapture) !== "undefined")
{
//document.body.releaseCapture();
e.target.releaseCapture();
}
}
CB_Mouse._updateButtonsDown(e, false);
},
Expand Down
2 changes: 1 addition & 1 deletion CrossBrowdy/CrossBrowdy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var CB_NAME = "CrossBrowdy";
* @constant
* @type {string}
*/
var CB_VERSION = "0.99.96.33";
var CB_VERSION = "0.99.96.34";

/**
* Keeps the CrossBrowdy "this" context.
Expand Down
30 changes: 22 additions & 8 deletions crossbrowdy.com/CrossBrowdy/CrossBase/input/CB_Mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,19 @@ var CB_Mouse = function() { return CB_Mouse; };
function(e)
{
e = CB_Mouse.normalizeEvent(e);
//Uses setCapture/releaseCapture to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//Uses setPointerCapture/releasePointerCapture (setCapture/releaseCapture) to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//if (typeof(document.body) !== "undefined" && typeof(document.body.setCapture) !== "undefined")
if (typeof(e.target) !== "undefined" && typeof(e.target.setCapture) !== "undefined")
if (typeof(e.target) !== "undefined")
{
//document.body.setCapture();
e.target.setCapture();
if (typeof(e.target.setPointerCapture) !== "undefined")
{
e.target.setPointerCapture(e.pointerId);
}
else if (typeof(e.target.setCapture) !== "undefined")
{
//document.body.setCapture();
e.target.setCapture();
}
}
CB_Mouse._updateButtonsDown(e, true);
},
Expand All @@ -80,12 +87,19 @@ var CB_Mouse = function() { return CB_Mouse; };
function(e)
{
e = CB_Mouse.normalizeEvent(e);
//Uses setCapture/releaseCapture to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//Uses setPointerCapture/releasePointerCapture (setCapture/releaseCapture) to force IE and Firefox to release mouse buttons when dragging outside the web client window:
//if (typeof(document.body) !== "undefined" && typeof(document.body.releaseCapture) !== "undefined")
if (typeof(e.target) !== "undefined" && typeof(e.target.releaseCapture) !== "undefined")
if (typeof(e.target) !== "undefined")
{
//document.body.releaseCapture();
e.target.releaseCapture();
if (typeof(e.target.releasePointerCapture) !== "undefined")
{
e.target.releasePointerCapture(e.pointerId);
}
else if (typeof(e.target.releaseCapture) !== "undefined")
{
//document.body.releaseCapture();
e.target.releaseCapture();
}
}
CB_Mouse._updateButtonsDown(e, false);
},
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/CrossBrowdy/CrossBrowdy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var CB_NAME = "CrossBrowdy";
* @constant
* @type {string}
*/
var CB_VERSION = "0.99.96.33";
var CB_VERSION = "0.99.96.34";

/**
* Keeps the CrossBrowdy "this" context.
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_config_download.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
define("EXAMPLES_FILENAME_PATH_ZIP", DOWNLOAD_FOLDER . EXAMPLES_FILENAME_BASE . ".zip");
define("EXAMPLES_FILENAME_PATH_ZIP_REAL", DOWNLOAD_FOLDER_REAL . EXAMPLES_FILENAME_BASE . ".zip");

define("CB_VERSION_CURRENT", "0.99.96.33");
define("CB_VERSION_CURRENT", "0.99.96.34");
define("CB_FILENAME_BASE", "CrossBrowdy_{VERSION}");
define("CB_FILENAME_PATH_ZIP", DOWNLOAD_FOLDER . CB_FILENAME_BASE . ".zip");
define("CB_FILENAME_PATH_ZIP_DIST", DOWNLOAD_FOLDER . CB_FILENAME_BASE . ".dist.zip");
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Arrays.html
Original file line number Diff line number Diff line change
Expand Up @@ -6628,7 +6628,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioDetector.html
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioFile.html
Original file line number Diff line number Diff line change
Expand Up @@ -7587,7 +7587,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioFileCache.html
Original file line number Diff line number Diff line change
Expand Up @@ -14978,7 +14978,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioFileSprites.html
Original file line number Diff line number Diff line change
Expand Up @@ -16807,7 +16807,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14672,7 +14672,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioFile_API.AAPI.html
Original file line number Diff line number Diff line change
Expand Up @@ -5590,7 +5590,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioFile_API.ACMP.html
Original file line number Diff line number Diff line change
Expand Up @@ -5821,7 +5821,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioFile_API.SM2.html
Original file line number Diff line number Diff line change
Expand Up @@ -5590,7 +5590,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_AudioFile_API.WAAPI.html
Original file line number Diff line number Diff line change
Expand Up @@ -6163,7 +6163,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Canvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -4693,7 +4693,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
4 changes: 2 additions & 2 deletions crossbrowdy.com/_html/_doc/api/CB_Client.html
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ <h4 class="name" id=".getButtonsDown"><span class="type-signature">&lt;static> <
<ul class="dummy">
<li>
<a href="CrossBase_input_CB_Mouse.js.html">CrossBase/input/CB_Mouse.js</a>,
<a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-291">line 291</a>
<a href="CrossBase_input_CB_Mouse.js.html#sunlight-1-line-305">line 305</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -5680,7 +5680,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Collisions.html
Original file line number Diff line number Diff line change
Expand Up @@ -7075,7 +7075,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13025,7 +13025,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Controllers.html
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2539,7 +2539,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.AmbientLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.Battery.html
Original file line number Diff line number Diff line change
Expand Up @@ -3289,7 +3289,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.Location.html
Original file line number Diff line number Diff line change
Expand Up @@ -2316,7 +2316,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.Motion.html
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.Orientation.html
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.Proximity.html
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.Vibration.html
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Device.html
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
2 changes: 1 addition & 1 deletion crossbrowdy.com/_html/_doc/api/CB_Elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -18678,7 +18678,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>

on Wed Mar 22nd 2023
on Tue Jan 16th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Loading

0 comments on commit deec958

Please sign in to comment.