Skip to content

Commit

Permalink
Build with pad buttons scale
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Jan 15, 2025
1 parent 9b66c4c commit 26082da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const version_id = 'dev',

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

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

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

function isPadPainter(p) {
Expand Down Expand Up @@ -71402,17 +71403,19 @@ class TPadPainter extends ObjectPainter {
const iscan = this.iscan || !this.has_canvas;
if (!iscan && (funcname.indexOf('Pad') !== 0) && (funcname !== 'enlargePad')) {
const cp = this.getCanvPainter();
if (cp && (cp !== this)) cp.addPadButton(btn, tooltip, funcname);
if (cp && (cp !== this))
cp.addPadButton(btn, tooltip, funcname);
}
}

/** @summary Show pad buttons
* @private */
showPadButtons() {
if (!this._buttons) return;
if (!this._buttons)
return;

PadButtonsHandler.assign(this);
this.showPadButtons();
PadButtonsHandler.assign(this);
this.showPadButtons();
}

/** @summary Add buttons for pad or canvas
Expand Down
2 changes: 1 addition & 1 deletion modules/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const version_id = 'dev',

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

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

0 comments on commit 26082da

Please sign in to comment.