Add re-order, spotlight/focus, and auto-position-snapshots features
- HTML5 drag-and-drop reordering of strip participants (per-GM flag) - Shift+click toggles spotlight focus on a participant (gold ring indicator) - Escape exits focus mode - Auto-save strip position on drag end + every 30s with viewport validation - Reset strip position button in Director's Board - French locale strings for reset button
This commit is contained in:
@@ -382,13 +382,29 @@ export class DirectorsBoard extends _AppBase {
|
||||
// Defaults match the settings registration in module.js
|
||||
const widgetWidthSm = this._adapter.settings?.get?.('widgetWidthSm') ?? '83';
|
||||
const widgetWidthMd = this._adapter.settings?.get?.('widgetWidthMd') ?? '150';
|
||||
const WIDTH_OPTIONS = [
|
||||
const SM_WIDTH_OPTIONS = [
|
||||
{ value: '60', label: '60px' },
|
||||
{ value: '70', label: '70px' },
|
||||
{ value: '80', label: '80px' },
|
||||
{ value: '90', label: '90px' },
|
||||
{ value: '100', label: '100px' },
|
||||
{ value: '120', label: '120px' },
|
||||
{ value: '140', label: '140px' },
|
||||
{ value: '160', label: '160px' },
|
||||
{ value: '180', label: '180px' },
|
||||
{ value: '200', label: '200px' },
|
||||
];
|
||||
const MD_WIDTH_OPTIONS = [
|
||||
{ value: '60', label: '60px' },
|
||||
{ value: '80', label: '80px' },
|
||||
{ value: '100', label: '100px' },
|
||||
{ value: '120', label: '120px' },
|
||||
{ value: '150', label: '150px' },
|
||||
{ value: '200', label: '200px' },
|
||||
{ value: '250', label: '250px' },
|
||||
{ value: '300', label: '300px' },
|
||||
{ value: '350', label: '350px' },
|
||||
{ value: '400', label: '400px' },
|
||||
];
|
||||
|
||||
// Tile shape selector
|
||||
@@ -433,7 +449,8 @@ export class DirectorsBoard extends _AppBase {
|
||||
tileBorderColor: currentTileBorderColor,
|
||||
tileBorderWidths: TILE_BORDER_WIDTHS,
|
||||
// Story 5.2: Video widget width customization
|
||||
widthOptions: WIDTH_OPTIONS,
|
||||
smWidthOptions: SM_WIDTH_OPTIONS,
|
||||
mdWidthOptions: MD_WIDTH_OPTIONS,
|
||||
widgetWidthSm,
|
||||
widgetWidthMd,
|
||||
};
|
||||
@@ -496,6 +513,7 @@ export class DirectorsBoard extends _AppBase {
|
||||
case 'set-dock-layout': this._onSetDockLayout(btn.dataset.layout); break;
|
||||
case 'set-tile-shape': this._onSetTileShape(btn.dataset.shape); break;
|
||||
case 'set-tile-border-width': this._onSetTileBorderWidth(parseInt(btn.dataset.width, 10)); break;
|
||||
case 'reset-strip-position': this._onResetStripPosition(); break;
|
||||
case 'close': this.close(); break;
|
||||
}
|
||||
};
|
||||
@@ -840,6 +858,17 @@ export class DirectorsBoard extends _AppBase {
|
||||
if (this.rendered) this.render({ force: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the saved strip position flag so the strip defaults to its original position.
|
||||
*/
|
||||
_onResetStripPosition() {
|
||||
try {
|
||||
game.user?.setFlag?.('scrying-pool', 'stripState', null);
|
||||
} catch (err) {
|
||||
console.error('[ScryingPool] Failed to reset strip position:', err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the PresetSaveDialog for saving the current visibility matrix as a preset.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user