@zgfe/business-lib 1.0.24-alpha.1 → 1.0.24-alpha.2

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.
@@ -6,7 +6,7 @@
6
6
  }
7
7
  .item {
8
8
  display: inline-block;
9
- width: 300px;
9
+ width: 10%;
10
10
  height: 150px;
11
11
  margin: @margin-md;
12
12
  line-height: 150px;
package/es/dnd/item.js CHANGED
@@ -47,10 +47,12 @@ var BizDndItem = function BizDndItem(props) {
47
47
  if (ref.current) {
48
48
  var computedStyle = window.getComputedStyle(ref.current);
49
49
  style = {
50
- position: 'fixed',
50
+ position: '',
51
51
  pointerEvents: 'inherit',
52
52
  top: top - Number(computedStyle.marginTop.replace('px', '')),
53
- left: left - Number(computedStyle.marginLeft.replace('px', ''))
53
+ left: left - Number(computedStyle.marginLeft.replace('px', '')),
54
+ width: computedStyle.width,
55
+ height: computedStyle.height
54
56
  };
55
57
  setStyle();
56
58
  preMouse = {
@@ -62,10 +64,13 @@ var BizDndItem = function BizDndItem(props) {
62
64
  }
63
65
 
64
66
  function onMouseMove(e) {
67
+ var computedStyle = window.getComputedStyle(ref.current);
65
68
  style.position = 'fixed';
66
69
  style.top += e.clientY - (preMouse.y || 0);
67
70
  style.left += e.clientX - (preMouse.x || 0);
68
71
  style.pointerEvents = 'none';
72
+ style.width = computedStyle.width;
73
+ style.height = computedStyle.height;
69
74
  setStyle();
70
75
  preMouse = {
71
76
  x: e.clientX,
@@ -82,7 +87,9 @@ var BizDndItem = function BizDndItem(props) {
82
87
  position: 'inherit',
83
88
  pointerEvents: 'inherit',
84
89
  top: 0,
85
- left: 0
90
+ left: 0,
91
+ width: '',
92
+ height: ''
86
93
  };
87
94
  setStyle();
88
95
  if (props.onDropEnd) props.onDropEnd(data);
@@ -94,6 +101,7 @@ var BizDndItem = function BizDndItem(props) {
94
101
  ref.current.style.top = "".concat(style.top, "px");
95
102
  ref.current.style.left = "".concat(style.left, "px");
96
103
  ref.current.style.pointerEvents = style.pointerEvents;
104
+ ref.current.style.width = style.width;
97
105
  }
98
106
  }
99
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.0.24-alpha.1",
3
+ "version": "1.0.24-alpha.2",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -58,5 +58,5 @@
58
58
  "react": "^16.12.0 || ^17.0.0",
59
59
  "yorkie": "^2.0.0"
60
60
  },
61
- "gitHead": "d11c81c871b7a2bb1bec63974a638665c506f4ce"
61
+ "gitHead": "262599946c1ae80f9f6836a01aa0b615efbeba23"
62
62
  }