Skip to content

Commit 03c057c

Browse files
author
MichaelKrone
committed
Restore z-index property on drop stop.
1 parent a04c245 commit 03c057c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/angular-dragdrop.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ var jqyoui = angular.module('ngDragDrop', []).service('ngDragDropService', ['$ti
195195
require: '?jqyouiDroppable',
196196
restrict: 'A',
197197
link: function(scope, element, attrs) {
198-
var dragSettings;
198+
var dragSettings, zIndex;
199199
var updateDraggable = function(newValue, oldValue) {
200200
if (newValue) {
201201
dragSettings = scope.$eval(element.attr('jqyoui-draggable')) || [];
@@ -204,11 +204,13 @@ var jqyoui = angular.module('ngDragDrop', []).service('ngDragDropService', ['$ti
204204
.draggable(scope.$eval(attrs.jqyouiOptions) || {})
205205
.draggable({
206206
start: function(event, ui) {
207+
zIndex = $(this).css('z-index');
207208
$(this).css('z-index', 99999);
208209
jqyoui.startXY = $(this).offset();
209210
ngDragDropService.callEventCallback(scope, dragSettings.onStart, event, ui);
210211
},
211212
stop: function(event, ui) {
213+
$(this).css('z-index', zIndex);
212214
ngDragDropService.callEventCallback(scope, dragSettings.onStop, event, ui);
213215
},
214216
drag: function(event, ui) {

0 commit comments

Comments
 (0)