From f8b34ed71e85115b28074e0fe22412857d7b0300 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 22 Sep 2025 12:47:41 +0200 Subject: [PATCH] client: lint & clean --- src/client/widgets/containers/panel.mjs | 3 --- src/client/widgets/sliders/scrollbar.mjs | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/client/widgets/containers/panel.mjs b/src/client/widgets/containers/panel.mjs index 77ebaea2..d4ce7b51 100644 --- a/src/client/widgets/containers/panel.mjs +++ b/src/client/widgets/containers/panel.mjs @@ -6,7 +6,6 @@ import parser from '../../parser.mjs' import {enableTraversingGestures, disableTraversingGestures} from '../../events/drag.mjs' import {setScrollbarColor} from '../../ui/utils.mjs' import Script from '../scripts/script.mjs' -import * as resize from '../../events/resize' import {DOM} from '../../globals.mjs' class Panel extends Container() { @@ -31,7 +30,6 @@ class Panel extends Container() { justify: {type: 'string', value: 'start', choices: ['start', 'end', 'center', 'space-around', 'space-between'], help:'If `layout` is `vertical` or `horizontal`, defines how widgets should be justified.'}, gridTemplate: {type: 'string|number', value: '', help:'If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template".'}, contain: {type: 'boolean', value: true, help:'If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel.'}, - scroll: {type: 'boolean|string', value: true, choices: [true, false, 'hidden'], help: 'Set to `false` to disable scrollbars, set to `hidden` to hide scrollbars while allowing to scroll (may not work on old browsers).'}, scroll: {type: 'boolean|string', value: true, choices: [true, false, 'hidden', 'manual'], help: [ '- `true`: scrollbars are show and content is scrollble', '- `false`: scrollbars are hidden and content is not scrollble', @@ -390,7 +388,6 @@ class Panel extends Container() { onRemove() { - this.off('resize') super.onRemove() } diff --git a/src/client/widgets/sliders/scrollbar.mjs b/src/client/widgets/sliders/scrollbar.mjs index 3e80eedc..a5bfcfea 100644 --- a/src/client/widgets/sliders/scrollbar.mjs +++ b/src/client/widgets/sliders/scrollbar.mjs @@ -177,7 +177,6 @@ export default class Scrollbar extends StaticProperties(Fader, { super.setValue(v, options) if (!options.fromScrollEvent && this.scrollTarget) { - var scroll = this.scrollTarget.getScroll() if (this.getProp('horizontal')) { this.scrollTarget.setScroll(this.value, undefined, true) } else { @@ -194,7 +193,6 @@ export default class Scrollbar extends StaticProperties(Fader, { var percent = this.steps ? this.valueToPercent(this.value) : this.percent, d = Math.round(this.percentToCoord(percent)), - o = Math.round(this.percentToCoord(this.valueToPercent(this.originValue))), m = this.getProp('horizontal') ? this.height / 2 : this.width / 2, dashed = this.dashed, knobHeight = this.cssVars.knobSize