@homecode/ui 4.19.3 → 4.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,8 +30,8 @@ import '../Container/Container.styl.js';
|
|
|
30
30
|
import '../DatePicker/DatePicker.styl.js';
|
|
31
31
|
import 'moment';
|
|
32
32
|
import '../DatePickerInput/DatePickerInput.styl.js';
|
|
33
|
-
import '../Draggable/Draggable.styl.js';
|
|
34
33
|
import '../../tools/queryParams.js';
|
|
34
|
+
import '../Draggable/Draggable.styl.js';
|
|
35
35
|
import '../Expand/Expand.styl.js';
|
|
36
36
|
import '../Form/Form.styl.js';
|
|
37
37
|
import '../Form/Validator.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
import S from './Draggable.styl.js';
|
|
4
|
-
import Time from 'timen';
|
|
5
|
-
import cn from 'classnames';
|
|
6
|
-
import { createStore } from 'justorm/react';
|
|
7
2
|
import 'nanoid';
|
|
8
3
|
import '../../tools/dom.js';
|
|
9
|
-
import
|
|
4
|
+
import throttle from '../../tools/throttle.js';
|
|
5
|
+
import Time from 'timen';
|
|
10
6
|
import 'compareq';
|
|
11
7
|
import 'lodash.pick';
|
|
12
8
|
import '../../tools/queryParams.js';
|
|
9
|
+
import { Component } from 'react';
|
|
10
|
+
import S from './Draggable.styl.js';
|
|
11
|
+
import cn from 'classnames';
|
|
12
|
+
import { createStore } from 'justorm/react';
|
|
13
13
|
|
|
14
14
|
class Draggable extends Component {
|
|
15
15
|
store;
|
|
@@ -60,7 +60,7 @@ class Draggable extends Component {
|
|
|
60
60
|
this.transformInner(this.draggingElem, `translate(${dx}px, ${dy}px)`);
|
|
61
61
|
this.checkUnderElem(x, y);
|
|
62
62
|
};
|
|
63
|
-
checkUnderElem =
|
|
63
|
+
checkUnderElem = throttle((x, y) => {
|
|
64
64
|
const underItem = document.elementFromPoint(x, y)?.closest(`.${S.item}`);
|
|
65
65
|
if (!underItem) {
|
|
66
66
|
this.store.underOffset = '';
|