@@ -131,7 +131,7 @@ const Runtime = ({
131
131
}
132
132
133
133
const onMouseDown = ( e ) => {
134
- if ( e . pageY > ( e . target . offsetTop + parseInt ( getComputedStyle ( resizableDiv , '' ) . height ) ) - 20 ) {
134
+ if ( e . pageY > ( e . target . offsetTop + e . target . offsetHeight ) ) {
135
135
mousePosition = e . y ;
136
136
document . addEventListener ( "mousemove" , resize , false ) ;
137
137
}
@@ -141,6 +141,10 @@ const Runtime = ({
141
141
document . removeEventListener ( "mousemove" , resize , false ) ;
142
142
}
143
143
144
+ const onMouseOut = ( ) => {
145
+ document . removeEventListener ( "mousemove" , resize , false ) ;
146
+ }
147
+
144
148
return (
145
149
< div className = "Runtime" >
146
150
@@ -159,7 +163,7 @@ const Runtime = ({
159
163
</ div >
160
164
</ div >
161
165
162
- < div className = "Runtime__scenarios-controls" id = "resizableDiv" onMouseDown = { onMouseDown } onMouseUp = { onMouseUp } >
166
+ < div className = "Runtime__scenarios-controls" id = "resizableDiv" >
163
167
< div className = "Runtime__scenarios-heading" > Ladatut skenaariot</ div >
164
168
< div className = "Runtime__scenarios" >
165
169
{ /* Create table of all scenarios "<Button-To-Add-As-Runnable> <Button-To-Open-Configuration>" */ }
@@ -252,6 +256,7 @@ const Runtime = ({
252
256
</ button >
253
257
</ div >
254
258
</ div >
259
+ < div className = "Runtime__scenarios_controls_drag_handle" onMouseDown = { onMouseDown } onMouseUp = { onMouseUp } onMouseOut = { onMouseOut } />
255
260
256
261
< div className = "Runtime__start-stop-controls" >
257
262
< div className = "Runtime__heading" > Ajettavana</ div >
0 commit comments