File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/website/js/synthesizer_ui/methods Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " SpessaSynth" ,
3- "version" : " 4.1.0 " ,
3+ "version" : " 4.1.1 " ,
44 "type" : " module" ,
55 "private" : true ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -97,6 +97,19 @@ export class Meter {
9797 if ( activeChangeCallback ) {
9898 activeChangeCallback ( true ) ;
9999 }
100+ const el = e . currentTarget as HTMLElement ;
101+ const bounds = el . getBoundingClientRect ( ) ;
102+ const relativeLeft = bounds . left ;
103+ const width = bounds . width ;
104+ const relative = e . clientX - relativeLeft ;
105+ const percentage = Math . max (
106+ 0 ,
107+ Math . min ( 1 , relative / width )
108+ ) ;
109+ if ( ! this . isLocked || isMobile ) {
110+ this . toggleLock ( ) ;
111+ }
112+ editCallback ( percentage * ( max - min ) + min ) ;
100113 } else {
101114 // Other, lock it
102115 this . toggleLock ( ) ;
You can’t perform that action at this time.
0 commit comments