File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,22 @@ function handleValueBlur() {
9696 self .value .value = Number (self .value .value );
9797}
9898
99+ import { Snackbar } from " sober" ;
99100function deleteAnnotation() {
100- emitter . emit ( " require-full-update " , " annotations axis change " ) ;
101+ const backup = props . self ;
101102 profile .annotations .splice (props .index , 1 );
103+ emitter .emit (" require-full-update" , " annotations axis change" );
104+ profile .datum .splice (props .index , 1 );
105+ Snackbar .builder ({
106+ text: t (" editor.delete.success" ),
107+ action: {
108+ text: t (" editor.delete.undo" ),
109+ click : () => {
110+ profile .annotations .splice (props .index , 0 , backup );
111+ emitter .emit (" require-full-update" , " annotations axis change" );
112+ },
113+ },
114+ });
102115}
103116 </script >
104117
@@ -136,6 +149,7 @@ function deleteAnnotation() {
136149 }
137150 .text {
138151 font-size : 16px ;
152+ flex-grow : 2 ;
139153 }
140154}
141155
You can’t perform that action at this time.
0 commit comments