File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/umi-plugin-ui/src/bubble/Dragger Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ export default class Draggable extends React.Component {
46
46
this . deltaX = 0 ;
47
47
this . deltaY = 0 ;
48
48
49
+ this . defaultScrollBarSize = getScrollBarSize ( ) ;
50
+
49
51
this . state = {
50
52
dragged : false ,
51
53
width : 0 ,
@@ -233,12 +235,10 @@ export default class Draggable extends React.Component {
233
235
if ( ! dragged || ! ! hide ) {
234
236
return ;
235
237
}
236
-
237
238
const scroll = getScrollOffsets ( ) ;
238
239
const clientWidth = getClientWidth ( ) ;
239
240
const clientHeight = getClientHeight ( ) ;
240
241
const { width, height } = node . getBoundingClientRect ( ) ;
241
-
242
242
const left = clientX + scroll . x - deltaX ;
243
243
const top = clientY + scroll . y - deltaY ;
244
244
let right = clientWidth - left - width ;
@@ -263,7 +263,7 @@ export default class Draggable extends React.Component {
263
263
}
264
264
265
265
// for better performance
266
- node . style . right = `${ right } px` ;
266
+ node . style . right = `${ right - this . defaultScrollBarSize } px` ;
267
267
node . style . bottom = `${ bottom } px` ;
268
268
269
269
this . setState (
You can’t perform that action at this time.
0 commit comments