Skip to content

Commit 26082da

Browse files
committed
Build with pad buttons scale
1 parent 9b66c4c commit 26082da

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

build/jsroot.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const version_id = 'dev',
1212

1313
/** @summary version date
1414
* @desc Release date in format day/month/year like '14/04/2022' */
15-
version_date = '13/01/2025',
15+
version_date = '15/01/2025',
1616

1717
/** @summary version id and date
1818
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -68908,7 +68908,8 @@ class BrowserLayout {
6890868908
const clTButton = 'TButton', kIsGrayscale = BIT(22);
6890968909

6891068910
function getButtonSize(handler, fact) {
68911-
return Math.round((fact || 1) * (handler.iscan || !handler.has_canvas ? 16 : 12));
68911+
const cp = handler.getCanvPainter();
68912+
return Math.round((fact || 1) * (cp?._pad_scale || 1) * (cp === handler ? 16 : 12));
6891268913
}
6891368914

6891468915
function isPadPainter(p) {
@@ -71402,17 +71403,19 @@ class TPadPainter extends ObjectPainter {
7140271403
const iscan = this.iscan || !this.has_canvas;
7140371404
if (!iscan && (funcname.indexOf('Pad') !== 0) && (funcname !== 'enlargePad')) {
7140471405
const cp = this.getCanvPainter();
71405-
if (cp && (cp !== this)) cp.addPadButton(btn, tooltip, funcname);
71406+
if (cp && (cp !== this))
71407+
cp.addPadButton(btn, tooltip, funcname);
7140671408
}
7140771409
}
7140871410

7140971411
/** @summary Show pad buttons
7141071412
* @private */
7141171413
showPadButtons() {
71412-
if (!this._buttons) return;
71414+
if (!this._buttons)
71415+
return;
7141371416

71414-
PadButtonsHandler.assign(this);
71415-
this.showPadButtons();
71417+
PadButtonsHandler.assign(this);
71418+
this.showPadButtons();
7141671419
}
7141771420

7141871421
/** @summary Add buttons for pad or canvas

modules/core.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const version_id = 'dev',
44

55
/** @summary version date
66
* @desc Release date in format day/month/year like '14/04/2022' */
7-
version_date = '13/01/2025',
7+
version_date = '15/01/2025',
88

99
/** @summary version id and date
1010
* @desc Produced by concatenation of {@link version_id} and {@link version_date}

0 commit comments

Comments
 (0)