Skip to content

Commit 394fd1e

Browse files
hansonrhansonr
authored andcommitted
fix for static applet info; scrollpane scroll bar upgrade
// BH 7/21/2018 fix for static{thisApplet.__Info.width=300} not working
1 parent 4bfacfb commit 394fd1e

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed
669 Bytes
Binary file not shown.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,7 @@ if (!J2S._version)
23252325
viewerOptions.put("display", applet._id + "_canvas2d");
23262326
var w = applet.__Info.width;
23272327
var h = applet.__Info.height;
2328-
if (w > 0 && h > 0 && (w != applet._canvas.width
2328+
if (applet._canvas && w > 0 && h > 0 && (w != applet._canvas.width
23292329
|| h != applet._canvas.height)) {
23302330
// developer has used static { thisApplet.__Info.width=...}
23312331
J2S.$(applet, "appletdiv").width(w).height(h);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12979,7 +12979,7 @@ if (!J2S._version)
1297912979
viewerOptions.put("display", applet._id + "_canvas2d");
1298012980
var w = applet.__Info.width;
1298112981
var h = applet.__Info.height;
12982-
if (w > 0 && h > 0 && (w != applet._canvas.width
12982+
if (applet._canvas && w > 0 && h > 0 && (w != applet._canvas.width
1298312983
|| h != applet._canvas.height)) {
1298412984
// developer has used static { thisApplet.__Info.width=...}
1298512985
J2S.$(applet, "appletdiv").width(w).height(h);

0 commit comments

Comments
 (0)