File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1212
1313<script lang =" ts" >
1414 import { t } from ' ../../i18n' ;
15- import type { MenuProperties } from ' ../../lib/navigation/Menus' ;
15+ import type { MenuProperties } from ' ../../lib/navigation/Menus' ;
1616 import Information from ' ../ui/information/Information.svelte' ;
1717
1818 export let title: string ;
1919 export let helpTitle: string ;
2020 export let helpDescription: string ;
2121 export let onClickFunction: () => void ;
2222 export let isExpanded: boolean ;
23- export let tooltipOffset: MenuProperties [' tooltipOffset' ] = {x: - 100 , y: 30 };
23+ export let tooltipOffset: MenuProperties [' tooltipOffset' ] = { x: - 100 , y: 30 };
2424 </script >
2525
2626<div >
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ export interface MenuProperties {
2121 collapsedButtonContent : typeof SvelteComponent < any > | undefined ;
2222 expandedButtonContent : typeof SvelteComponent < any > ;
2323 additionalExpandPaths ?: PathType [ ] ;
24- tooltipOffset ?: { x : number , y : number } ;
25- } ;
24+ tooltipOffset ?: { x : number ; y : number } ;
25+ }
2626
2727/**
2828 * Wrapper for the menu logic, use navigation if possible, this is for fine-grained control of menus.
@@ -64,7 +64,7 @@ class Menus {
6464 collapsedButtonContent : undefined ,
6565 expandedButtonContent : ModelMenu ,
6666 navigationPath : Paths . MODEL ,
67- tooltipOffset : { x : - 100 , y : - 250 }
67+ tooltipOffset : { x : - 100 , y : - 250 } ,
6868 } ,
6969 ]
7070 : [
Original file line number Diff line number Diff line change 1010 import { tr } from ' ../../i18n' ;
1111 import { stores } from ' ../../lib/stores/Stores' ;
1212 const validationSets = stores .getValidationSets ();
13- $ : isClearDisabled = $validationSets .length === 0 ;
14- const clearValidationSets = () => validationSets .clear ();
13+ $ : isClearDisabled =
14+ $validationSets .length === 0 ||
15+ $validationSets .map (e => e .recordings .length ).reduce ((pre , cur ) => pre + cur , 0 ) ===
16+ 0 ;
17+ const clearValidationSets = () =>
18+ confirm ($tr (' content.data.controlbar.button.clearData.confirm' )) &&
19+ validationSets .clear ();
1520 </script >
1621
1722<ControlBar >
You can’t perform that action at this time.
0 commit comments