File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1257,6 +1257,14 @@ a.hide-toggle {
1257
1257
font-style : italic;
1258
1258
}
1259
1259
1260
+ button .preset-reset .label .flash-bg {
1261
+ animation : flash-bg 750ms ;
1262
+ }
1263
+ @keyframes flash-bg {
1264
+ 0% { background-color : # fff ; }
1265
+ 100% { background-color : # f6f6f6 ; }
1266
+ }
1267
+
1260
1268
.preset-list-button .label-inner {
1261
1269
width : 100% ;
1262
1270
line-height : 1.35em ;
Original file line number Diff line number Diff line change 1
1
import { dispatch as d3_dispatch } from 'd3-dispatch' ;
2
+ import { select as d3_select } from 'd3-selection' ;
2
3
import deepEqual from 'fast-deep-equal' ;
3
4
4
5
import { presetManager } from '../presets' ;
@@ -142,10 +143,10 @@ export function uiEntityEditor(context) {
142
143
if ( priorActivePreset && _activePresets . length === 1 && priorActivePreset !== _activePresets [ 0 ] ) {
143
144
// flash the button to indicate the preset changed
144
145
context . container ( ) . selectAll ( '.entity-editor button.preset-reset .label' )
145
- . style ( 'background-color ', '#fff' )
146
- . transition ( )
147
- . duration ( 750 )
148
- . style ( 'background-color' , null ) ;
146
+ . classed ( 'flash-bg ', true )
147
+ . on ( 'animationend' , function ( ) {
148
+ d3_select ( this ) . classed ( 'flash-bg' , false ) ;
149
+ } ) ;
149
150
}
150
151
}
151
152
}
You can’t perform that action at this time.
0 commit comments