Skip to content

Commit a828b2e

Browse files
author
Volodymyr Zaets
committed
Merge remote-tracking branch 'origin/MAGETWO-51049' into PR
2 parents 76e1e76 + 5631d25 commit a828b2e

File tree

2 files changed

+11
-6
lines changed
  • app
    • code/Magento/Ui/view/base/web/js/dynamic-rows
    • design/adminhtml/Magento/backend/web/css/source/forms/fields

2 files changed

+11
-6
lines changed

app/code/Magento/Ui/view/base/web/js/dynamic-rows/dnd.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,13 @@ define([
183183
/**
184184
* Mouse up handler
185185
*/
186-
mouseupHandler: function () {
186+
mouseupHandler: function (event) {
187187
var depElementCtx,
188-
drEl = this.draggableElement;
188+
drEl = this.draggableElement,
189+
pageY = isTouchDevice ? event.originalEvent.touches[0].pageY : event.pageY,
190+
positionY = pageY - drEl.eventMousedownY;
191+
192+
drEl.depElement = this.getDepElement(drEl.instance, positionY);
189193

190194
if (drEl.depElement) {
191195
depElementCtx = this.getRecord(drEl.depElement.elem[0]);
@@ -272,12 +276,12 @@ define([
272276
rec = collection.eq(i);
273277

274278
if (position === 'before') {
275-
rangeStart = collection.eq(i).position().top;
276-
rangeEnd = rangeStart + this.step;
279+
rangeStart = collection.eq(i).position().top - this.step;
280+
rangeEnd = rangeStart + this.step * 2;
277281
className = this.separatorsClass.top;
278282
} else if (position === 'after') {
279-
rangeEnd = rec.position().top + rec.height();
280-
rangeStart = rangeEnd - this.step;
283+
rangeEnd = rec.position().top + rec.height() + this.step;
284+
rangeStart = rangeEnd - this.step * 2;
281285
className = this.separatorsClass.bottom;
282286
}
283287

app/design/adminhtml/Magento/backend/web/css/source/forms/fields/_control-table.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205

206206
.admin__dynamic-rows {
207207
&._dragged {
208+
opacity: .95;
208209
position: absolute;
209210
z-index: 999;
210211
}

0 commit comments

Comments
 (0)