Skip to content

Commit 37668be

Browse files
committed
SwingJS-site.zip for // BH 2022.08.27 fix
// BH 2022.08.27 fix frame resize for ChromeBook/Chrome with non-integer event.pageX,pageY
1 parent 9d9dae7 commit 37668be

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed
0 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20220713221322
1+
20220827141103
0 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20220713221322
1+
20220827141103
0 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/srcjs/swingjs2.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
2+
33
// BH 2022.01.12 adds pointer option see BHTEST
44

55
* jQuery JavaScript Library v1.11.0
@@ -10379,6 +10379,8 @@ return jQuery;
1037910379

1038010380
}));
1038110381
// j2sQueryExt.js]
10382+
10383+
// BH 2022.08.27 fix frame resize for ChromeBook/Chrome with non-integer event.pageX,pageY
1038210384
// BH 2022.01.12 adds pointer option
1038310385
// BH 7/13/2019 removing hook for J2S.unsetMouse
1038410386
// BH 7/21/2016 9:25:38 PM passing .pageX and .pageY to jQuery event
@@ -13803,8 +13805,8 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
1380313805
J2S._dmouseDrag = drag;
1380413806

1380513807
tag.isDragging = true; // used by J2S mouse event business
13806-
pageX = ev.pageX;
13807-
pageY = ev.pageY;
13808+
pageX = Math.round(ev.pageX);
13809+
pageY = Math.round(ev.pageY);
1380813810
var xy = {
1380913811
x : 0,
1381013812
y : 0,
@@ -13818,8 +13820,8 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
1381813820
var o = $(target(501)).position();
1381913821
if (!o) return false;
1382013822
xy = {
13821-
x : o.left,
13822-
y : o.top
13823+
x : Math.round(o.left),
13824+
y : Math.round(o.top)
1382313825
};
1382413826
}
1382513827
pageX0 = xy.x;
@@ -13833,8 +13835,8 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
1383313835
tag.isDragging = false;
1383413836
var mode = (tag.isDragging ? 506 : 503);
1383513837
if (!J2S._dmouseOwner || tag.isDragging && J2S._dmouseOwner == tag) {
13836-
x = pageX0 + (dx = ev.pageX - pageX);
13837-
y = pageY0 + (dy = ev.pageY - pageY);
13838+
x = pageX0 + (dx = Math.round(ev.pageX) - pageX);
13839+
y = pageY0 + (dy = Math.round(ev.pageY) - pageY);
1383813840
if (isNaN(x))return;
1383913841
if (fDrag) {
1384013842
fDrag({

0 commit comments

Comments
 (0)